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

Ralph Goers edited comment on LOG4J2-2484 at 10/23/18 4:06 PM:
---------------------------------------------------------------

I don't see anything in this discussion regarding that.  Yes SimpleLogger is 
used before the configuration is read, but the vast majority of logging happens 
during or after configuration. All of the Log4j configuration implementations 
read the attributes on the configuration element before doing anything. A 
couple of those affect status logging. The StatusLogger is configured with a 
listener before any actual configuration is performed. Once that happens 
SimpleLogger is no longer used. What messages are you thinking will be printed 
out before the configuration is read that are not errors?

Which API? You can do exactly the same thing the configuration does - it just 
adds the ConsoleStatusListener with the appropriate configuration and that 
causes it to be used instead of SimpleLogger. SimpleLogger is just a fallback 
in case you didn't configure anything.



was (Author: [email protected]):
I don't see anything in this discussion regarding that.  Yes SimpleLogger is 
used before the configuration is read, but the vast majority of logging happens 
during or after configuration. All of the Log4j configuration implementations 
read the attributes on the configuration element before doing anything. A 
couple of those affect status logging. The StatusLogger is configured with a 
listener before any actual configuration is performed. Once that happens 
SimpleLogger is no longer used. What messages are you thinking will be printed 
out before the configuration is read that are not errors?


> 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