// Remove the existing appenders.
for (Enumeration<?> appEnum = root.getAllAppenders(); appEnum.hasMoreElements();) {
final Appender appender = (Appender) appEnum.nextElement();
if (appender != debugApp && appender != infoApp) {
root.removeAppender(appender);
}
}
if (LOG_TO_KERNEL_DEBUGGER) {
UnsafeDebugAppender kdbApp = new UnsafeDebugAppender(new PatternLayout(LAYOUT));
kdbApp.setThreshold(Level.DEBUG);