private void configureLogging(T configuration) {
// set logging level and file programmatically if defined
if (configuration.getLogging() != null) {
ch.qos.logback.classic.Logger rootLogger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
FileAppender fileAppender = (FileAppender) rootLogger.getAppender("FILE");
rootLogger.detachAppender(fileAppender);
rootLogger.setLevel(configuration.getLogging().getLevel());
if (configuration.getLogging().getFileName() != null) {
fileAppender.setFile(configuration.getLogging().getFileName());
}
rootLogger.addAppender(fileAppender);
fileAppender.start();
}
}