Set currentLoggerNames = new HashSet();
Enumeration enu = LogManager.getCurrentLoggers();
while (enu.hasMoreElements()) {
Logger logger = (Logger)enu.nextElement();
currentLoggerNames.add(logger.getName());
}
try {
SAXReader reader = new SAXReader();
Document doc = reader.read(portalLog4jUrl);
Element root = doc.getRootElement();
Iterator itr = root.elements("category").iterator();
while (itr.hasNext()) {
Element category = (Element)itr.next();
String name = category.attributeValue("name");
String priority =
category.element(
"priority").attributeValue("value");
Logger logger = Logger.getLogger(name);
logger.setLevel(Level.toLevel(priority));
}
}
catch (Exception e) {
com.dotmarketing.util.Logger.error(this,e.getMessage(),e);
}