[Swift-commit] r6626 - branches/faster/src/org/griphyn/vdl/util
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Mon Jul 8 19:26:08 CDT 2013
Author: hategan
Date: 2013-07-08 19:26:08 -0500 (Mon, 08 Jul 2013)
New Revision: 6626
Modified:
branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java
Log:
fixed logging
Modified: branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java 2013-07-08 20:48:48 UTC (rev 6625)
+++ branches/faster/src/org/griphyn/vdl/util/LazyFileAppender.java 2013-07-09 00:26:08 UTC (rev 6626)
@@ -27,7 +27,11 @@
public synchronized void setFile(String fileName, boolean append, boolean bufferedIO, int bufferSize)
throws IOException {
LogLog.debug("setFile called: " + fileName + ", " + append);
-
+
+ if (this.qw != null) {
+ return;
+ }
+
// set a stdout writer just in case
reset();
Writer fw = createWriter(System.out);
@@ -55,6 +59,9 @@
// Save file name since reset() sets it to null
String fileName = this.fileName;
+
+ // Set to null to prevent parent class from closing System.out
+ this.qw = null;
reset();
this.fileName = fileName;
FileOutputStream ostream = null;
More information about the Swift-commit
mailing list