开发者

Log4j - Log only specified method to file

Using log开发者_如何学Python4j to log specific events (DEBUG, ERROR, FATAL..) having specified in the properties file to log only DEBUG i still end up having other error messages logged in the file. Is there a way to tell log4j to log only specific events to a file?

Thank You.


Read on appender additivity. You must set it to false. A similar question was asked before on SO.

Relevant code snippet:

<category name="org.quartz" additivity="false">
    <priority value="DEBUG" />
</category>

Version for a properties file:

log4j.additivity.org.quartz = false
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜