/**
* @deprecated Avoid usage of Plexus apis.
*/
protected LoggerManager getLoggerManager() throws ComponentLookupException {
LoggerManager loggerManager = getContainer().lookup(LoggerManager.class);
// system property helps configure logger - see NXCM-3230
String testLogLevel = System.getProperty("test.log.level");
if (testLogLevel != null) {
if (testLogLevel.equalsIgnoreCase("DEBUG")) {
loggerManager.setThresholds(Logger.LEVEL_DEBUG);
}
else if (testLogLevel.equalsIgnoreCase("INFO")) {
loggerManager.setThresholds(Logger.LEVEL_INFO);
}
else if (testLogLevel.equalsIgnoreCase("WARN")) {
loggerManager.setThresholds(Logger.LEVEL_WARN);
}
else if (testLogLevel.equalsIgnoreCase("ERROR")) {
loggerManager.setThresholds(Logger.LEVEL_ERROR);
}
}
return loggerManager;
}