perry2of5 commented on a change in pull request #469:
URL: https://github.com/apache/logging-log4j2/pull/469#discussion_r622310395



##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
##########
@@ -405,6 +405,7 @@ public boolean stop(final long timeout, final TimeUnit 
timeUnit) {
             }
         }
         LOGGER.debug("Stopped LoggerContext[name={}, {}] with status {}", 
getName(), this, true);
+       StatusLogger.getLogger().prepareToStop();

Review comment:
       Something needs to tell the StatusLogger there is a stop event. 
Otherwise it never releases the file handles for the listeners writing to a 
file. 
   
   In the code on master on windows the status logger log file is never closed 
so the file remains locked which causes the test to fail. Now the LoggerContext 
is telling the StatusLogger that a shutdown event is happening. In the code 
I'll push later, I've added a paremeter to say which context is shutting down 
so the StatusLogger can remove the listeners for that context.




-- 
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]


Reply via email to