if (EnvUtil.isGroovyAvailable()) {
lc.reset();
GafferConfigurator gafferConfigurator = new GafferConfigurator(lc);
gafferConfigurator.run(fileToScan);
lc.getStatusManager().add(
new InfoStatus("done resetting the logging context", this));
} else {
StatusManager sm = context.getStatusManager();
sm.add(new ErrorStatus("Groovy classes are not available on the class path. ABORTING INITIALIZATION.",
context));
}
} else if (fileToScan.toString().endsWith("xml")) {
JoranConfigurator jc = new JoranConfigurator();
jc.setContext(context);
lc.reset();
try {
jc.doConfigure(fileToScan);
lc.getStatusManager().add(
new InfoStatus("done resetting the logging context", this));
} catch (JoranException e) {
addError("Failure during reconfiguration", e);
}
}
}