java.util.logging backend for ActorLogging system, see #2805
[RK: assembled commit log from original branch, squashed] akka-contrib: - an event handler which properly sets the ThreadID on log records - a LoggingAdapter which does synchronous logging to j.u.l.Logger - a small logging mixin for the aforementioned adapter
This commit is contained in:
parent
0c9ad2f791
commit
280e1aa21a
3 changed files with 226 additions and 0 deletions
17
akka-contrib/docs/jul.rst
Normal file
17
akka-contrib/docs/jul.rst
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Java Logging (JUL)
|
||||
=================
|
||||
|
||||
This extension module provides a logging backend which uses the `java.util.logging` (j.u.l)
|
||||
API to do the endpoint logging for `akka.event.Logging`.
|
||||
|
||||
Provided with this module is an implementation of `akka.event.LoggingAdapter` which is independent of any `ActorSystem` being in place. This means that j.u.l can be used as the backend, via the Akka Logging API, for both Actor and non-Actor codebases.
|
||||
|
||||
To enable j.u.l as the `akka.event.Logging` backend, use the following Akka config:
|
||||
|
||||
event-handlers = ["akka.contrib.jul.JavaLoggingEventHandler"]
|
||||
|
||||
To access the `akka.event.Logging` API from non-Actor code, mix in `akka.contrib.jul.JavaLogging`.
|
||||
|
||||
This module is preferred over SLF4J with its JDK14 backend, due to integration issues resulting in the incorrect handling of `threadId`, `className` and `methodName`.
|
||||
|
||||
This extension module was contributed by Sam Halliday.
|
||||
Loading…
Add table
Add a link
Reference in a new issue