luisgoncalves commented on issue #3665:
URL: 
https://github.com/apache/logging-log4j2/issues/3665#issuecomment-3715139767

   Hi
   
   When using XML configuration, I noticed the opposite change in behavior 
(i.e. status logging starting being sent to stderr) from 2.22.0 to 2.25.3 
(assuming `dest` is not set in the XML configuration file).
   
   As far as I could tell, this is because `StatusConfiguration` [used to 
register a listener defaulting to 
stdout](https://github.com/apache/logging-log4j2/blob/rel/2.22.0/log4j-core/src/main/java/org/apache/logging/log4j/core/config/status/StatusConfiguration.java#L40).
 `StatusLogger` had a default "simple logger" targeting stderr, but it is only 
used [when there aren't any 
listeners](https://github.com/apache/logging-log4j2/blob/rel/2.22.0/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java#L292)
 (without debug enabled). so, in practice, I used to get status logging in 
stdout.
   
   In 2.25.3, `StatusConfiguration` directly configures the fallback status 
listener instead of adding a new listener, and the fallback listener uses 
stderr (as fixed by this ticket). Since I don't have other listeners, [the 
fallback listener is 
used](https://github.com/apache/logging-log4j2/blob/rel/2.25.3/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java#L767)
 and I started seeing status logs in stderr.
   
   Setting `dest="out"` in the XML configuration solves it, but I think I 
didn't see this mentioned in release notes, so I thought I'd comment here.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to