LOG.debug("Console LOG level set to " + consoleThreshold);
}
if (fileName != null) {
PatternLayout layout = new PatternLayout("%d{ABSOLUTE} %-5p %x %m%n");
FileAppender fileAppender = new FileAppender(layout, fileName, false);
fileAppender.setName(FILE_APPENDER_NAME);
Level fileThreshold = Level.toLevel(fileLevel, Level.DEBUG);
fileAppender.setThreshold(fileThreshold);
Logger.getRootLogger().addAppender(fileAppender);
LOG.debug("Added fileAppender (" + fileName + ") at level " + fileThreshold);
}
} catch (Exception e) {
System.err.println("Error configuring logging framework: " + e.getMessage());