I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 4b19801c authored by zzz's avatar zzz
Browse files

try to prevent out-of-order logging at shutdown

parent e62d9dfa
No related branches found
No related tags found
No related merge requests found
......@@ -664,7 +664,17 @@ public class LogManager {
public void shutdown() {
if (_writer != null) {
_log.log(Log.WARN, "Shutting down logger");
//_log.log(Log.WARN, "Shutting down logger");
// try to prevent out-of-order logging at shutdown
synchronized (_writer) {
_writer.notifyAll();
}
if (!_records.isEmpty()) {
try {
Thread.sleep(250);
} catch (InterruptedException ie) {}
}
// this could generate out-of-order messages
_writer.flushRecords(false);
_writer.stopWriting();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment