akka/akka — pull request #1228 by patriknw (2013-03-07 11:29:41+00:00)
Title: Log actor failures in supervisor, see #2824

* To make it possible to override with application
specific logging, or mute logging for certain failures
* Changed log level of Resume failures to WARNING, which
caused all the changes to the tests

To mute default logging:

override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 0, loggingEnabled = false) {
case _: IllegalArgumentException ⇒ Resume
case _: NullPointerException ⇒ Restart
case _: Exception ⇒ Escalate
}

To add custom logging:

override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 0, loggingEnabled = false) {
case _: IllegalArgumentException ⇒ Resume
case e: NullPointerException ⇒
log.error(e, "NPE")
Restart
case _: Exception ⇒ Escalate
}

Or, for stand alone `SupervisorStrategy` classes override `logFailure`.