Immediately flush the console log
This commit is contained in:
parent
eb880f5593
commit
cc17131003
@ -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