akka.event.slf4j
Class Slf4jEventHandler
java.lang.Object
akka.event.slf4j.Slf4jEventHandler
- All Implemented Interfaces:
- Actor, SLF4JLogging
public class Slf4jEventHandler
- extends java.lang.Object
- implements Actor, SLF4JLogging
SLF4J Event Handler.
The thread in which the logging was performed is captured in
Mapped Diagnostic Context (MDC) with attribute name "sourceThread".
Method Summary |
java.lang.String |
mdcAkkaSourceAttributeName()
|
java.lang.String |
mdcThreadAttributeName()
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive()
This defines the initial actor behavior, it must return a partial function
with the actor logic. |
void |
withMdc(java.lang.String logSource,
java.lang.String thread,
scala.Function0<scala.runtime.BoxedUnit> logStatement)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Slf4jEventHandler
public Slf4jEventHandler()
mdcThreadAttributeName
public java.lang.String mdcThreadAttributeName()
mdcAkkaSourceAttributeName
public java.lang.String mdcAkkaSourceAttributeName()
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
- Description copied from interface:
Actor
- This defines the initial actor behavior, it must return a partial function
with the actor logic.
- Specified by:
receive
in interface Actor
withMdc
public final void withMdc(java.lang.String logSource,
java.lang.String thread,
scala.Function0<scala.runtime.BoxedUnit> logStatement)