Merge branch 'master' of github.com:jboner/akka
This commit is contained in:
commit
2ea6e97a41
16 changed files with 334 additions and 22 deletions
|
|
@ -217,8 +217,7 @@ It has one single dependency; the slf4j-api jar. In runtime you also need a SLF4
|
|||
You need to enable the Slf4jEventHandler in the 'event-handlers' element in
|
||||
the :ref:`configuration`. Here you can also define the log level of the event bus.
|
||||
More fine grained log levels can be defined in the configuration of the SLF4J backend
|
||||
(e.g. logback.xml). The String representation of the source object that is used when
|
||||
creating the ``LoggingAdapter`` correspond to the name of the SL4FJ logger.
|
||||
(e.g. logback.xml).
|
||||
|
||||
.. code-block:: ruby
|
||||
|
||||
|
|
@ -227,6 +226,23 @@ creating the ``LoggingAdapter`` correspond to the name of the SL4FJ logger.
|
|||
loglevel = "DEBUG"
|
||||
}
|
||||
|
||||
The SLF4J logger selected for each log event is chosen based on the
|
||||
:class:`Class[_]` of the log source specified when creating the
|
||||
:class:`LoggingAdapter`, unless that was given directly as a string in which
|
||||
case that string is used (i.e. ``LoggerFactory.getLogger(c: Class[_])`` is used in
|
||||
the first case and ``LoggerFactory.getLogger(s: String)`` in the second).
|
||||
|
||||
.. note::
|
||||
|
||||
Beware that the the actor system’s name is appended to a :class:`String` log
|
||||
source if the LoggingAdapter was created giving an :class:`ActorSystem` to
|
||||
the factory. If this is not intended, give a :class:`LoggingBus` instead as
|
||||
shown below:
|
||||
|
||||
.. code-block:: scala
|
||||
|
||||
val log = Logging(system.eventStream, "my.nice.string")
|
||||
|
||||
Logging Thread and Akka Source in MDC
|
||||
-------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue