Details
Description
The attached mavenised example demonstrated the observed behaviour.
In essence the following is observed:
// Shutdown Log4J2 LogManager.shutdown(); // line 1 // LogManager.shutdown(LogManager.getContext(false)); // line 2 Files.delete(logFile); // line 3
Using line 1; line 3 above should execute with no exceptions. For v2.12.1 this is observed. For v2.13.0; line 3 throws an exception because the logFile has a open lock still active.
When line 2 is substituted for line 1. Line 3 executes with no exception for both v2.12.1 and v2.13.0
I was able to determine that this behavior change was introduced by LOG4J2-2716 (253ada6ff2fb6c6a0dcfee8ed432372215f2ef78).