* in domain.xml (the app server config file).
* _REVISIT_:
* 1. Replace multiple if (loggerName) checks with a Hashmap
*/
public static Level getConfiguredLogLevel(String loggerName) {
ServerContext sc = ApplicationServer.getServerContext();
if (sc == null) {
if (loggerName.startsWith(SYNCHRONIZATION)) {
try {
String level = System.getProperty(SYNCHRONIZATION, "INFO");
return Level.parse(level);
} catch (Exception e) {
return Level.INFO;
}
} else {
return Level.INFO;
}
}
if (loggerName.equals(LogDomains.DPLAUDIT_LOGGER)) {
try {
Level level = DeploymentAuditLogHandler.getConfiguredLevel();
return level;
} catch (Throwable thr) {
return Level.OFF;
}
}
Level logLevel = null;
try {
Config cfg =
ServerBeansFactory.getConfigBean(sc.getConfigContext());
ModuleLogLevels allModulesLogLevels =
cfg.getLogService().getModuleLogLevels( );
// _REVISIT_: Right now ModuleLogLevels element in Log-Service
// is optional. If the user doesn't specify any module log levels
// then we will use 'INFO' as the default. For 8.1 this should