Immediately flush the console log
This commit is contained in:
parent
b92a1630a1
commit
1026ca4f8d
@ -60,7 +60,17 @@ public class EnvoyLog {
|
||||
} catch (SecurityException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
consoleHandler = new StreamHandler(System.out, formatter);
|
||||
consoleHandler = new StreamHandler(System.out, formatter) {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public synchronized void publish(LogRecord record) {
|
||||
super.publish(record);
|
||||
flush();
|
||||
}
|
||||
};
|
||||
consoleHandler.setLevel((Level) config.get("consoleLevelBarrier").get());
|
||||
consoleHandler.setFormatter(formatter);
|
||||
|
||||
|
Reference in New Issue
Block a user