选择哪个 log4j 门面?
Essentially I'm looking for something with the same behavior, configuration, logging levels as log4j, but with some of the missing functionality (e.g. formatted logging — see here and here for related SO threads.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
由于许多框架已经支持 slf4j,因此您只需使用 slf4j 设置一次日志记录。
我使用 slf4j,它非常易于阅读和使用。
since a lot of frameworks already support slf4j you will only have to setup your logging once with slf4j.
i use slf4j and it is super-easy to read + use.
我倾向于SLF4J。
log5j 很好,但没有那么多市场渗透。
I'm inclined toward SLF4J.
log5j is good, but does not have near as much market penetration.
我还建议使用 SLF4J,最好与 Logback 一起使用。
查看 Java 中的日志记录有何变化? 和 在 java 日志框架场景中找到一种方法。。
I'd also suggest SLF4J, ideally with Logback.
Take a look at What’s Up with Logging in Java? and Find a way in the java logging frameworks scene., too.