}
}
}
// Update the logger data according to the data stored in the registry.
Collection loggerCollection = registryManager.getLoggers();
if (loggerCollection != null) {
String[] loggerResourcePaths = loggerCollection.getChildren();
for (String loggerResourcePath : loggerResourcePaths) {
String loggerName = loggerResourcePath.substring(LoggingConstants.LOGGERS.length());
Logger logger = LogManager.getLogger(loggerName);
Resource loggerResource = registryManager.getLogger(loggerName);
if (loggerResource != null && logger != null) {
logger.setLevel(Level.toLevel(loggerResource
.getProperty(LoggingConstants.LoggerProperties.LOG_LEVEL)));
logger.setAdditivity(Boolean.parseBoolean(loggerResource
.getProperty(LoggingConstants.LoggerProperties.ADDITIVITY)));
}
}
}
// update the appender data according to data stored in database
Collection appenderCollection = registryManager.getAppenders();
if (appenderCollection != null) {
String[] appenderResourcePaths = appenderCollection.getChildren();
for (String appenderResourcePath : appenderResourcePaths) {
String appenderName = appenderResourcePath.substring(LoggingConstants.APPENDERS
.length());
Appender appender = getAppenderFromSet(appenderSet, appenderName);
Resource appenderResource = registryManager.getAppender(appenderName);