{
String logConfigFileName = ApplicationArguments.getInstance().getLoggingConfigFileName();
if (logConfigFileName != null) {
PropertyConfigurator.configure(logConfigFileName);
} else {
ApplicationFiles appFiles = new ApplicationFiles();
String logMessagePattern = "%-4r [%t] %-5p %c %x - %m%n";
Layout layout = new PatternLayout(logMessagePattern);
File logsDir = new File(appFiles.getUserSettingsDirectory(), "logs");
File updateLogFile = new File(logsDir, "updater.log");
FileAppender appender = new FileAppender(layout, updateLogFile.getAbsolutePath());
LoggerController.registerLoggerFactory(new SquirrelLoggerFactory(appender, false));