Link Details

Link 887425 thumbnail
User 894285 avatar

By grobmeier
via grobmeier.de
Published: Dec 06 2012 / 08:27

Apache log4j is one the worlds most famos logging frameworks. In this blog you'll learn about a few exciting new features in the brandnew log4j version 2.0.
  • 10
  • 1
  • 1346
  • 1374

Comments

Add your comment
User 352719 avatar

Jonathan Fisher replied ago:

1 votes Vote down Vote up Reply

God No. Make it stop. Why? I was happy log4j was dead and slf4j won. Why? Why? WHHHHHYYYY?

User 894285 avatar

grobmeier replied ago:

1 votes Vote down Vote up Reply

@Jonathan: I had very good reasons to work on log4j, and so do the others have. First, slf4j is a logging facade and log4j is a logging framework. There is a huge difference between both. It actually means I would recommend you to stick with slf4j. log4j is in competition with logback. With using slf4j you can chose easily between both, whatever addresses most of your use case. Besides that there is no "winner" (except you mean slf4j did "win" against "commons-logging", which is indeed true) I (and I think the others) have had TONS of good reasons to work hard on log4j 2.

User 352719 avatar

Jonathan Fisher replied ago:

0 votes Vote down Vote up Reply

Ok, good point, and I don't mean to diminish your hard work, I meant my comment more of a joke pointed at the 15 or so competing standards for java logging. I think should be more clear, I think SLF4J should be everyone's default choice for logging, especially if you're creating libraries (like guava, spring, hibernate, etc) The problem is that a lot of people will reach for log4j when developing a library, putting users in a messy situation that was just starting to get better. :/

User 894285 avatar

grobmeier replied ago:

0 votes Vote down Vote up Reply

Well, I agree: one should slf4j. This is why we (log4j2 ppl) have created a binding to that from day 1. And yes, in all other open source projects i'm participating I try to urge people using slf4j. Actually I even tried to make "Commons Logging" a dormant component. That said I agree that there should be a *good* logging standard. At the moment it seems to me that JUL is not doing a good job. Instead I would love to see slf4j becoming the next logging API standard in the JDK (similar to what happens to Joda Time right now). This would actually help everybody. Providers like log4j2 or logback would be interchangeable as long as you use the standard (aka slf4j). But this is a different beast. That said, I agree we should make it visible that for most developers - esp for those creating libraries - slf4j is the way to go. Thanks for making a second comment which let me understand better.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (10)



Voters Against This Link (1)



Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java