Вот что я закончил:
Я читаю переменную env и вызываю System.setProperty, чтобы установить значение в качестве системной переменной, и сбрасываю loggercontext.
System.setProperty(REM_HOME, remHome);
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
try {
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(context);
// Call context.reset() to clear any previous configuration, e.g. default
// configuration. For multi-step configuration, omit calling context.reset()
context.reset();
configurator.doConfigure(getClass().getClassLoader().getResourceAsStream(LOG_CONF_FILE));
}
catch (JoranException je) {
// StatusPrinter will handle this
je.printStackTrace();
}
StatusPrinter.printInCaseOfErrorsOrWarnings(context);