Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
log4j 简介 是 log4j 的一个非常好的起点。
如果您准备花一些钱,可以购买 log4j 手册。
顺便说一句,如果您不熟悉 Java 登录,我建议您使用 slf4j + logback 组合。在我看来,这是最好的日志记录解决方案。 Slf4j 是一个日志记录“外观”,它需要一个底层实现。可以使用Log4j和logback作为实现。
由于 logback 是 log4j 的继承者并且由同一作者制作,因此我建议使用它。不仅如此,logback 的手册可以在线获取,而且是免费的。
由于log4j的发展或多或少已经停滞,我建议您升级到slf4j + logback。
The short introduction to log4j is a perfectly fine starting point for log4j.
If you're ready to spend some money, you can buy the log4j manual.
By the way, if you're new to logging in Java, I'd suggest the slf4j + logback combo. In my opinion, this is the best logging solution available. Slf4j is a logging "facade" and it needs an implementation underneath. Log4j and logback can be used as implementations.
Since logback is log4j's successor and made by the same author, I'd suggest using it instead. Not only that, logback's manual is available online and it's free.
Since log4j's development has more or less stalled, I'd suggest you upgrade to slf4j + logback.
请看看这个"如何集成log4j Java 项目” 可以帮助您。它会带您完成 5 个快速步骤。
即使问题较旧,因为您已经要求提供有关如何快速入门的教程或博客文章,我想到了分享这个。
Please see whether this "How to integrate log4j with Java project" helps you. It takes you through 5 quick steps.
Even though the question is older, as you have asked for a tutorial or a blog post on how to get started quickly, I thought of sharing this.