if (!logPathFile.exists() || !logPathFile.isDirectory()) {
log.error("Unable to use path for permanent log '" + permanentLogPath + "' because it either does not exist or is no directory.");
}
else {
log.info("Permanent application log stored in directory " + permanentLogPath);
DatedFileAppender permanentFileAppender = new DatedFileAppender(permanentLogPath, "wga-", ".log");
permanentFileAppender.setName("wga.permanentLog");
permanentFileAppender.setAppend(true);
permanentFileAppender.setEncoding("UTF-8");
permanentFileAppender.setLayout(LAYOUT_APPLOG);
this.baseAppender.addAppender(permanentFileAppender);
}
}
}