try to fix log flush error at file rotation

This commit is contained in:
zzz
2010-11-30 19:04:03 +00:00
parent 6de6fb1b56
commit 293eea9e38
3 changed files with 6 additions and 7 deletions

View File

@ -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();

View File

@ -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)

View File

@ -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 = "";