if (dbLogger == null || dbLogger.trim().equals(""))
{
return;
}
JDBCAppender appender = new JDBCAppender();
appender.setOption(JDBCAppender.LOGGER_CLASS_OPTION, dbLogger);
/*
* This sucks, but we are stuck with setOption(String, String).
* I want people to be able to specify their own db logger
* implementation and the options without having to touch
* anything else, but log4j doesn't really make it that easy.
*/
//appender.setOption(JDBCAppender.LOGGER_OPTION, "pool:" + dbPool);
appender.setLayout(layout);
appender.activateOptions();
logger.addAppender(appender);
}