Github user cakofony commented on a diff in the pull request:
https://github.com/apache/logging-log4j2/pull/240#discussion_r234189607
--- Diff:
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
---
@@ -156,7 +156,9 @@ public synchronized boolean closeOutputStream() {
flush();
if (randomAccessFile != null) {
try {
- randomAccessFile.close();
+ if (randomAccessFile != null) {
+ randomAccessFile.close();
+ }
--- End diff --
I think this was recently fixed on line 157, see
https://issues.apache.org/jira/browse/LOG4J2-2418
---