return mapper.readValue(stream, ConfigurationImpl.class);
}
protected void setupLogging() {
Logger root = Logger.getRootLogger();
WriterAppender appender;
if (this.debug) {
appender = new ConsoleAppender();
appender.setThreshold(Level.ALL);
} else {
FileAppender replacement = new FileAppender();
replacement.setFile(this.logfile.getAbsolutePath());
replacement.setAppend(true);
replacement.setThreshold(Level.INFO);
appender = replacement;
}
root.removeAllAppenders();
root.addAppender(appender);
appender.setName("dns-frontend");
appender.setLayout(new PatternLayout("%d %-5p %t [%c{1}] %m%n"));
appender.activateOptions();
}