perry2of5 commented on a change in pull request #469:
URL: https://github.com/apache/logging-log4j2/pull/469#discussion_r622308281
##########
File path:
log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java
##########
@@ -205,6 +205,32 @@ public void reset() {
clear();
}
}
+
+ /**
+ * Stop all the listeners except those writing to standard out or error. If
+ * no loggers write to standard out or error, then add one and stop the
+ * others.
+ */
+ public void prepareToStop() {
Review comment:
The commentary in the mailing list indicates the status logger shouldn't
be closed, we need to redirect the status logger to standard out iff there is
no remaining listener that writes to a file. If the log4j code is running in
the container the prepareToStop functionality should stop the listener for the
context that is shutting down. This code is flawed because it stops the
listeners for all contexts. I'll push some changes that stop listeners on a
context-by-context basis.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]