【发布时间】:2012-04-22 11:58:49
【问题描述】:
我们能否在一个类中创建两个 log4j 实例以写入文件,另一个在 jdbcadapter 中?
// one to write log in console
Logger log = Logger.getLogger(this.getClass());
// write in database within one class
Logger log1 = Logger.getLogger(this.getClass());
我的 jdbc 适配器是 我的文件适配器是 我想为 File 记录 Logger 实例日志,为 jdbc 记录 Logger Instant log1。
【问题讨论】:
-
在您的示例拖车实例中是相同的。