logger = (TopicalLogger)
mf.getLogger(DottedStringTools.getBegin(temp));
cleanOldHandler(logger);
while(st.hasMoreTokens()) {
String hn = st.nextToken();
Handler h = mf.getHandler(hn);
if (h == null) {
h = parseHandlerProp(prop, HANDLER_FIELD + DOT + value
+ DOT + HANDLER_TYPE_ATTRIBUTE, mf);
}
if (debug) {
debug("add handler " + h.getName() + " to the logger " + logger.getName());
}
logger.addHandler(h);
}
} else if (TOPIC_FIELD.equalsIgnoreCase(last)) {
logger = (TopicalLogger)
mf.getLogger(DottedStringTools.getBegin(temp));
String value = prop.getProperty(key).trim();
StringTokenizer st = new StringTokenizer(value, ", ;:", false);
cleanOldHandler(logger);
while(st.hasMoreTokens()) {
String topic = st.nextToken();
if (debug) {
debug("add topic " + topic + " to the logger " + logger.getName());
}
logger.addTopic(topic);
}
} else { //old declaration
temp = DottedStringTools.getBegin(temp); // remove the number
last = DottedStringTools.getLast(temp); // attribute name
temp = DottedStringTools.getBegin(temp); // logger name
logger = (TopicalLogger) mf.getLogger(temp);
if (last.equalsIgnoreCase(HANDLER_FIELD)) {
// Assign an handler to a logger
String value = prop.getProperty(key).trim();
Handler h = mf.getHandler(value);
if (h == null) {
h = parseHandlerProp(prop, HANDLER_FIELD + DOT + value
+ DOT + HANDLER_TYPE_ATTRIBUTE, mf);
}
cleanOldHandler(logger);
if (debug) {
debug("add handler " + h.getName() + " to the logger " + logger.getName());
}
logger.addHandler(h);
} else if (last.equalsIgnoreCase(TOPIC_FIELD)) {
// Assign a topic to a logger
String topic = prop.getProperty(key).trim();