diff --git a/core/java/src/net/i2p/util/LogWriter.java b/core/java/src/net/i2p/util/LogWriter.java index d1970b745..f68249ba7 100644 --- a/core/java/src/net/i2p/util/LogWriter.java +++ b/core/java/src/net/i2p/util/LogWriter.java @@ -28,22 +28,20 @@ import net.i2p.I2PAppContext; class LogWriter implements Runnable { /** every 10 seconds? why? Just have the gui force a reread after a change?? */ private final static long CONFIG_READ_INTERVAL = 50 * 1000; - private final static long FLUSH_INTERVAL = 11 * 1000; + private final static long FLUSH_INTERVAL = 9 * 1000; private long _lastReadConfig = 0; private long _numBytesInCurrentFile = 0; - private Writer _currentOut; + // volatile as it changes on log file rotation + private volatile Writer _currentOut; private int _rotationNum = -1; private String _logFilenamePattern; private File _currentFile; - private LogManager _manager; + private final LogManager _manager; private boolean _write; private static final int MAX_DISKFULL_MESSAGES = 8; private int _diskFullMessageCount; - private LogWriter() { // nop - } - public LogWriter(LogManager manager) { _manager = manager; _lastReadConfig = Clock.getInstance().now(); diff --git a/history.txt b/history.txt index d25eb4729..4074c0182 100644 --- a/history.txt +++ b/history.txt @@ -6,6 +6,7 @@ - Limit buffer size; block and wakeup writer when full - Limit errors written to system log - Add method to force a log below the current level + - Try to fix log flushing error * Streaming: Change some logged errors to warnings (tickets 76, 341 and others) diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 8ab24107c..80cfb9c84 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 17; + public final static long BUILD = 18; /** for example "-test" */ public final static String EXTRA = "";