[ 
https://issues.apache.org/jira/browse/LOG4J2-2484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16659843#comment-16659843
 ] 

Robert Ross commented on LOG4J2-2484:
-------------------------------------

**I changed the ticket to specifically avoid saying this should go to STDOUT.  
Assuming that we would want diagnostics output to STDERR or STDOUT is 
needlessly restrictive.  Perhaps we want it to a file stream or some other 
stream.  Saying something is "by convention" does not mean it has to be utterly 
restricted to such.  Convention is analogous to a default setting, not a 
requirement.  There are many use cases for this, one of which I just supplied.  
Another would be avoiding issues where wrapped launchers make assumptions about 
how to react to STDERR.  For example, IDEs will often force the console to the 
front if there is STDERR, because it assumes this is an error.  Trace and 
diagnostics output are NOT errors.

Also, can you point me to where it is documented as a convention that 
diagnostic messages should go to STDERR anyway?  I thought STDERR was for... 
errors.  Is this an Apache convention or some type of more general convention 
of which I am unaware.

> Allow setting of output stream on StatusLogger
> ----------------------------------------------
>
>                 Key: LOG4J2-2484
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2484
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Robert Ross
>            Priority: Minor
>              Labels: StatusLogger, debugging
>
> The StatusLogger internally uses a SimpleLogger.  SimpleLogger offers the 
> ability to control the output stream, but StatusLogger encapsulates and hides 
> this capability, always using System.err as the output stream.
> It would be useful to expose this option so that the API offers some control 
> over the output stream used by StatusLogger.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to