English 中文(简体)
日志4j和共同点
原标题:log4j and Commons Logging co-existing
  • 时间:2009-10-14 15:39:57
  •  标签:

In my application I m using log4j and some 3rd party jars. One of those 3rd party jars is using Commons Logging. Now whenever I use classes from that 3rd party jar, somehow the log message is handled by two separate appenders. For example:

  • 在我的记录4j中,有价 我明确指出:

    • log4j.logger.myClass=DEBUG, serverFile, defaultSTDOUT, where serverFile is a org.apache.log4j.RollingFileAppender and defaultSTDOUT is org.apache.log4j.ConsoleAppender
  • 在我的代码I do Loggerlogger = Logger.get Carloger(myClass.class)中,然后,我把它称为伐木。 debug(“信号”)

  • 页: 1

DEBUG [2009-10-14 16:08:34,415] - debug information

51215 [Thread-13] DEBUG myClass - debug information

The first line is mine and the second line is probably there because of that 3rd party jar. How can I ensure that only my log message are shown?

最佳回答

看来,具体指明我的伐木业的原木4j. 额外性的确发挥了作用。

问题回答

暂无回答




相关问题
热门标签