- 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
- add Java API for FaultHandlingStrategy.Action values
- verify that Mailbox.debug being a constant elides its printlns
- remove dead code from bubbleWalker
- it was telling all children to stop(), then waited for the
ChildTerminated messages and finally terminated itself
- this worked fine, except when the stop came from the supervisor, i.e.
the recipient was suspended and did not process the ChildTerminated
- so, as the mirror of Supervise() that it is, I changed
ChildTerminated() to be a system message and instead of stopping
processing normal messages by checking the stopping flag, just suspend
the actor while awaiting the ChildTerminated's to flow in.
* Fixed obvious
* Created tickets for several, #1408, #1409, #1410, #1412, #1415, 1416, #1418
* Moved LoggingReceive from akka.actor to akka.event
* Touched several of the FIXME to make them visible in code review
- ensure that no “complex” things are attached to a LogEvent (think
serialization)
- ensure no escaping the “this” reference via LoggingBus during
constructors (e.g. ActorSystem)
- change it so that
+ Actor/ActorRef are represented by their address
+ Class[_] by simpleName
+ String by itself
- this means that people need to think a little more while deciding how
“this” should look like in logging (which I think is a good thing)
- the same information is transmitted as sender, hence enabling
ChildTerminated to become a singleton
- make lastSender accessible in TestKit (needed now for DeathWatchSpec)
- fix nasty infinite loop when logging at the wrong moment during
shutdown
(since I know now what’s causing these Jenkins failures ;-) )
- include recipient in DeadLetter
- include recipient in calls to enqueue/systemEnqueue
- move DeadLetterMailbox to ActorSystem (saves some space, too)
- hook up DeadLetterMailbox so it sends DeadLetters to app.deadLetters,
which publishes them on the eventStream
- subscribe TestEventListener to DeadLetter and turn it into Warning
The generated warnings about ChildTerminated are very much correct, they
remind us that we still need to fix supervisor.stop() to await all
children’s death before actually committing suicide.
- enqueuing system messages to DeadLetterMailbox was broken in
principle, but not in practice for the current default deadLetter
implementation
- add assert that system messages are not enqueued multiple times
- *BusSpec was using incorrect compareSubscribers based on
identityHashCode, so moved the proper solution out of
BalancingDispatcher and into akka.util.Helpers and reuse that in all
places
- make normal filters available for all four log levels
- allow filtering for
+ exact and complete message
+ start of message
+ regular expression
- keep count of occurrences if requested and verify correct count at end
of filterEvents/filterExceptions block
- remove akka.testkit.Testing (sleepFor replaced by Duration.dilated.sleep)
- remove Duration.timeFactor (needs config -> AkkaApplication)
- TestLatch needs config -> AkkaApplication (was forgotten because used
directly System.getProperty)
- lots of scaladoc for TestEventListener infrastructure
most tests passing, everything compiling, but docs not updated and nasty
thread-leak preventing me from running the whole test-suite (which is
the reason for this commit: I want to chase down that one first).
- the app.mainbus is classified by Class[_] (currently lookup, will
possibly change to sub-class-aware) and accepts AnyRef messages
- LoggingBus handles akka.event-handlers from config specially:
+ start them as system services, supervised by SystemGuardian
+ keep their subscriptions in sync when logLevel_= is called
+ send them InitializeLogger(bus) message before subscribing them (so
they can register for extras like Mute/UnMute)
- two-phased start-up: first phase with actor-less stdout logging, then
subscription of config loggers, then remove stdout logger (logLevels
configurable separately)
- MainBusReaper watches registered receivers and unsubscribes them upon
death (started in phase 2)
- logger factory on Logging object, needs app/bus and log source;
default instance in app.log
- AkkaApplication.stop() will stop the guardian; when that stops, it
will send ChildTerminated to the BubbleWalker, who will then complete
a Promise
- AkkaApplication.terminationFuture is that Promise and available for
registration of onComplete callback, used now to shutdown the
Scheduler
- AkkaSpec extends BeforeAndAfterAll and uses that to call app.stop(),
exposing atStartup() and atTermination() overridable hooks
- fixed some tests