选择哪个 log4j 门面?

发布于 2024-07-23 22:35:30 字数 364 浏览 2 评论 0原文

本质上,我正在寻找与 log4j 具有相同行为、配置、日志记录级别的东西,但缺少一些功能(例如格式化日志记录 - 请参阅 此处此处了解相关的SO线程。)

当前提名者是slf4jlog5j

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.)

Current nominees are slf4j and log5j.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

神仙妹妹 2024-07-30 22:35:30

由于许多框架已经支持 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.

话少情深 2024-07-30 22:35:30

我倾向于SLF4J。

log5j 很好,但没有那么多市场渗透。

I'm inclined toward SLF4J.

log5j is good, but does not have near as much market penetration.

一生独一 2024-07-30 22:35:30

我还建议使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文