Fix crash when logger can't be found
This commit is contained in:
parent
e06cd1213d
commit
8efdc9490c
@ -763,8 +763,14 @@ public class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
}
|
}
|
||||||
Logger.getRootLogger().setLevel(newLevel);
|
Logger.getRootLogger().setLevel(newLevel);
|
||||||
logger.setLevel(newLevel);
|
logger.setLevel(newLevel);
|
||||||
((ConsoleAppender)Logger.getRootLogger().getAppender("stdout")).setThreshold(newLevel);
|
ConsoleAppender ca = (ConsoleAppender)Logger.getRootLogger().getAppender("stdout");
|
||||||
((FileAppender)Logger.getRootLogger().getAppender("FILE")).setThreshold(newLevel);
|
if (ca != null) {
|
||||||
|
ca.setThreshold(newLevel);
|
||||||
|
}
|
||||||
|
FileAppender fa = (FileAppender)Logger.getRootLogger().getAppender("FILE");
|
||||||
|
if (fa != null) {
|
||||||
|
fa.setThreshold(newLevel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupTrayIcon() {
|
private void setupTrayIcon() {
|
||||||
|
Loading…
Reference in New Issue
Block a user