addAppendersToSet(logger.getAllAppenders(), appenderSet);
logger.setLevel(systemLevel);
}
//Update the logger data according stored in the registry
Collection loggerCollection = registryManager.getLoggers();
if (loggerCollection != null) {
String[] loggerResourcePaths = loggerCollection.getChildren();
for (String loggerResourcePath : loggerResourcePaths) {
Logger logger = LogManager.getLogger(loggerResourcePath.substring(LoggingConstants.LOGGERS.length()));
Resource loggerResource = registryManager.getLogger(loggerResourcePath);
if (loggerResource != null && logger != null) {
loggerResource.setProperty(LoggingConstants.LoggerProperties.LOG_LEVEL, logLevel);
}
}
}
Layout patternLayout = new PatternLayout(logPattern);
for(Appender appender:appenderSet){
if (appender instanceof AppenderSkeleton) {
AppenderSkeleton appenderSkeleton = (AppenderSkeleton) appender;
appenderSkeleton.setThreshold(systemLevel);
appenderSkeleton.setLayout(patternLayout);
appenderSkeleton.activateOptions();
}
}
// update the appender data stored in the registry
Collection appenderCollection = registryManager.getAppenders();
if (appenderCollection != null) {
String[] appenderResourcePaths = appenderCollection.getChildren();
for (String appenderResourcePath : appenderResourcePaths) {
Appender appender = LoggingUtil.getAppenderFromSet(appenderSet, appenderResourcePath.substring(
LoggingConstants.APPENDERS.length()));
Resource appenderResource = registryManager.getAppender(appenderResourcePath);
if (appenderResource != null && appender != null) {