if (loggerFactory instanceof LoggerContext) {
LoggerContext ctx = (LoggerContext)loggerFactory;
IPath path = RedmineCommonPlugin.getDefault().getLogFilePath();
try {
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(ctx);
ctx.reset();
ctx.putProperty("rmc.logfile", path.toString()); //$NON-NLS-1$
configurator.doConfigure(getClass().getResourceAsStream("/logback.xml")); //$NON-NLS-1$
} catch (JoranException e) {
ILogService logService = LogServiceImpl.getInstance(RedmineCommonPlugin.getDefault().getBundle(), LogWriter.class);
logService.error(e, "Logback configuration failed"); //$NON-NLS-1$
}
}