mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
Disable ConsoleAppender in gui mode
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1132 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
e1b12c63ef
commit
7379cdbb40
@ -244,6 +244,15 @@ public final class Settings {
|
||||
}
|
||||
fileAppender.setFile(logFilePath, true, false, 8192);
|
||||
rootLogger.addAppender(fileAppender);
|
||||
|
||||
// disable ConsoleAppender in gui mode
|
||||
if (!Settings.getBooleanProperty("davmail.server")) {
|
||||
ConsoleAppender consoleAppender = (ConsoleAppender)rootLogger.getAppender("ConsoleAppender");
|
||||
if (consoleAppender != null) {
|
||||
consoleAppender.setThreshold(Level.OFF);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_SET_LOG_FILE_PATH"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user