diff --git a/akka-actor/src/main/resources/reference.conf b/akka-actor/src/main/resources/reference.conf index 3201e7c06f..0a04fc1c8a 100644 --- a/akka-actor/src/main/resources/reference.conf +++ b/akka-actor/src/main/resources/reference.conf @@ -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" diff --git a/akka-docs/rst/general/configuration.rst b/akka-docs/rst/general/configuration.rst index cf7bf3fb29..f31de0d04b 100644 --- a/akka-docs/rst/general/configuration.rst +++ b/akka-docs/rst/general/configuration.rst @@ -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" diff --git a/akka-docs/rst/java/logging.rst b/akka-docs/rst/java/logging.rst index 83e40da63a..4dacd2256a 100644 --- a/akka-docs/rst/java/logging.rst +++ b/akka-docs/rst/java/logging.rst @@ -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 diff --git a/akka-docs/rst/scala/logging.rst b/akka-docs/rst/scala/logging.rst index 76be04baf7..4b36e9b427 100644 --- a/akka-docs/rst/scala/logging.rst +++ b/akka-docs/rst/scala/logging.rst @@ -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