1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22: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:
mguessan 2010-07-06 09:43:39 +00:00
parent e1b12c63ef
commit 7379cdbb40

View File

@ -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"));
}