logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1592291 - /logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java
Date Sat, 03 May 2014 22:55:20 GMT
Author: mattsicker
Date: Sat May  3 22:55:19 2014
New Revision: 1592291

URL: http://svn.apache.org/r1592291
Log:
Don't close stdout or stderr.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java?rev=1592291&r1=1592290&r2=1592291&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java
Sat May  3 22:55:19 2014
@@ -105,6 +105,9 @@ public class StatusConsoleListener imple
 
     @Override
     public void close() throws IOException {
-        this.stream.close();
+        // only want to close non-system streams
+        if (this.stream != System.out && this.stream != System.err) {
+            this.stream.close();
+        }
     }
 }



Mime
View raw message