console.setEncoder(consolePat);
root.addAppender(console);
if (logFile != null) {
String lstr = options.getString("log_level");
Level logLevel = Level.toLevel(lstr, Level.INFO);
FileAppender<ILoggingEvent> fileOutput = new FileAppender<ILoggingEvent>();
fileOutput.setAppend(false);
fileOutput.setContext(context);
fileOutput.setFile(logFile.getAbsolutePath());
PatternLayoutEncoder filePat = new PatternLayoutEncoder();