Print configuration errors to stderr
------------------------------------
Key: LBCORE-209
URL: http://jira.qos.ch/browse/LBCORE-209
Project: logback-core
Issue Type: Improvement
Components: Other
Affects Versions: 0.9.28
Reporter: atomicknight
Assignee: Logback dev list
In org.slf4j.impl.StaticLoggerBinder#init(), any detected configuration errors
are passed to StatusPrinter to be printed. However, the default PrintStream
used by StatusPrinter is stdout, which can interfere with the output of
command-line based Java programs that are used in the same fashion as
applications such as ls or grep.
Would it be possible to modify this behavior such that configuration errors are
printed to stderr instead? A potential solution would be to overload
StatusPrinter#printInCaseofErrorsOrWarning and
StatusPrinter#printIfErrorsOccurred with versions that also take a PrintStream
as an argument - this would allow classes like StaticLoggerBinder to specify
the appropriate output stream without overriding the global state in
StatusPrinter. Alternatively, an additional setting in the XML configuration
might work just as well.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev