=doc #2859 Describe stdout logger more

This commit is contained in:
Patrik Nordwall 2014-02-05 10:26:54 +01:00
parent eb8a3b2c3e
commit 2b35f632fe
4 changed files with 24 additions and 6 deletions

View file

@ -26,7 +26,8 @@ akka {
# Options: OFF, ERROR, WARNING, INFO, DEBUG
loglevel = "INFO"
# Log level for the very basic logger activated during AkkaApplication startup
# Log level for the very basic logger activated during ActorSystem startup.
# This logger prints the log messages to stdout (System.out).
# Options: OFF, ERROR, WARNING, INFO, DEBUG
stdout-loglevel = "WARNING"

View file

@ -98,7 +98,8 @@ A custom ``application.conf`` might look like this::
# Options: OFF, ERROR, WARNING, INFO, DEBUG
loglevel = "DEBUG"
# Log level for the very basic logger activated during AkkaApplication startup
# Log level for the very basic logger activated during ActorSystem startup.
# This logger prints the log messages to stdout (System.out).
# Options: OFF, ERROR, WARNING, INFO, DEBUG
stdout-loglevel = "DEBUG"

View file

@ -218,8 +218,6 @@ Loggers
Logging is performed asynchronously through an event bus. Log events are processed by an event handler actor
and it will receive the log events in the same order as they were emitted.
One gotcha is that currently the timestamp is attributed in the event handler, not when actually doing the logging.
You can configure which event handlers are created at system start-up and listen to logging events. That is done using the
``loggers`` element in the :ref:`configuration`.
Here you can also define the log level.
@ -247,6 +245,14 @@ Example of creating a listener:
.. _slf4j-java:
Logging to stdout during startup and shutdown
=============================================
While the actor system is starting up and shutting down the configured ``loggers`` are not used.
Instead log messages are printed to stdout (System.out). The default log level for this
stdout logger is ``WARNING`` and it can be silenced completely by setting
``akka.stdout-loglevel=OFF``.
SLF4J
=====
@ -272,6 +278,8 @@ More fine grained log levels can be defined in the configuration of the SLF4J ba
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
}
One gotcha is that the timestamp is attributed in the event handler, not when actually doing the logging.
The SLF4J logger selected for each log event is chosen based on the
:class:`Class` of the log source specified when creating the

View file

@ -261,8 +261,6 @@ Loggers
Logging is performed asynchronously through an event bus. Log events are processed by an event handler actor
and it will receive the log events in the same order as they were emitted.
One gotcha is that currently the timestamp is attributed in the event handler, not when actually doing the logging.
You can configure which event handlers are created at system start-up and listen to logging events. That is done using the
``loggers`` element in the :ref:`configuration`.
Here you can also define the log level.
@ -288,6 +286,14 @@ Example of creating a listener:
.. _slf4j-scala:
Logging to stdout during startup and shutdown
=============================================
When the actor system is starting up and shutting down the configured ``loggers`` are not used.
Instead log messages are printed to stdout (System.out). The default log level for this
stdout logger is ``WARNING`` and it can be silenced completely by setting
``akka.stdout-loglevel=OFF``.
SLF4J
=====
@ -311,6 +317,8 @@ More fine grained log levels can be defined in the configuration of the SLF4J ba
loglevel = "DEBUG"
}
One gotcha is that the timestamp is attributed in the event handler, not when actually doing the logging.
The SLF4J logger selected for each log event is chosen based on the
:class:`Class[_]` of the log source specified when creating the
:class:`LoggingAdapter`, unless that was given directly as a string in which