}
if (logFNamePrefix == null)
logFNamePrefix = "lsmrLog";
RollingFileAppender rfa = null;
try {
if (ca != null)
if (verbose) {
ca.setLayout(new PatternLayout(LOG_PATTERN_VERBOSE));
if (logDirectory != null)
rfa = new RollingFileAppender(new PatternLayout(LOG_PATTERN_VERBOSE), logDirectory
+ logFNamePrefix + ".txt");
} else {
ca.setLayout(new PatternLayout(LOG_PATTERN_FAST));
if (logDirectory != null)
rfa = new RollingFileAppender(new PatternLayout(LOG_PATTERN_FAST), logDirectory
+ logFNamePrefix + ".txt");
}
if (logDirectory != null) {
rfa.setMaxBackupIndex(10);
rfa.setMaxFileSize("10MB");
Logger.getRootLogger().addAppender(rfa);
XMLLayout xmlLayout = new XMLLayout();
xmlLayout.setLocationInfo(true);
rfa = new RollingFileAppender(xmlLayout, logDirectory + logFNamePrefix + ".xml");
rfa.setMaxBackupIndex(10);
rfa.setMaxFileSize("10MB");
Logger.getRootLogger().addAppender(rfa);
}
} catch (IOException ioe) {
ioe.printStackTrace();