add Class[_] to LogEvent
- it is customary to use class name for categorizing logs, hence we should support it; class is taken from logSource.getClass - update SLF4J module to use logClass as category and set logSource in MDC "akkaSource" - add docs
This commit is contained in:
parent
0470f5f9fd
commit
d0498eb32e
25 changed files with 295 additions and 137 deletions
|
|
@ -162,10 +162,10 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
|
|||
system.eventStream.subscribe(testActor, classOf[Logging.Info])
|
||||
|
||||
myActor ! "test"
|
||||
expectMsgPF(1 second) { case Logging.Info(_, "received test") ⇒ true }
|
||||
expectMsgPF(1 second) { case Logging.Info(_, _, "received test") ⇒ true }
|
||||
|
||||
myActor ! "unknown"
|
||||
expectMsgPF(1 second) { case Logging.Info(_, "received unknown message") ⇒ true }
|
||||
expectMsgPF(1 second) { case Logging.Info(_, _, "received unknown message") ⇒ true }
|
||||
|
||||
system.eventStream.unsubscribe(testActor)
|
||||
system.eventStream.publish(TestEvent.UnMute(filter))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue