use of org.bushe.swing.event.annotation.EventSubscriber in project gfm_viewer by satyagraha.
the class LogManager method configChanged.
@EventSubscriber(eventClass = Config.Changed.class)
public void configChanged(Config.Changed configChanged) {
Level level = debugging || config.useEclipseConsole() ? Level.FINE : Level.INFO;
logger.setLevel(level);
if (consoleHandler == null) {
consoleHandler = new ConsoleHandler();
consoleHandler.setFormatter(formatter);
logger.addHandler(consoleHandler);
}
if (logConsoleHandler == null && config.useEclipseConsole()) {
LogConsole.start(GFM_CONSOLE);
logConsoleHandler = LogConsole.getInstance().createHandler(formatter);
logger.addHandler(logConsoleHandler);
}
for (Handler handler : logger.getHandlers()) {
handler.setLevel(level);
}
}
Aggregations