Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.13.3
-
None
-
None
Description
Currently, the default status logging destination for internal Log4j logging is the standard output stream. This is problematic for command line tools whose output is processed by other processes. The default destination for Log4j internal logging should be STDERR.
Note that initially (before the configuration is processed) the status logger actually does output to STDERR, but once the configuration is processed, the StatusLogger starts to delegate to the StatusListeners, and the StatusConsoleListener that is installed by the StatusConfiguration has their DEFAULT_STREAM set to System.out. I believe this is an oversight and the intention has always been for internal status logging to go to System.err.
As a workaround, applications can explicitly configure the destination with the dest attribute:
<?xml version="1.0" encoding="UTF-8"?> <Configuration status="error" dest="err"> ...