logFilePattern = UserConfig.getUserLogDir() + File.separator + LOG_FILE_PATTERN;
}
if (logFilePattern != null) {
Handler fileLogHandler = new FileHandler(logFilePattern, LOG_FILE_LIMIT, LOG_FILE_COUNT, true);
fileLogHandler.setFormatter(new LogFormatter());
Logging.addGlobalHandler(fileLogHandler);
}
// --debug, add console handler
if (options.has(optionDebug) || options.has(optionLogPrint) || (options.has(optionLog) && "-".equals(options.valueOf(optionLog)))) {
Handler consoleLogHandler = new ConsoleHandler();
consoleLogHandler.setFormatter(new LogFormatter());
Logging.addGlobalHandler(consoleLogHandler);
}
}