Published: Dec 06 2012 / 08:27
God No. Make it stop. Why? I was happy log4j was dead and slf4j won. Why? Why? WHHHHHYYYY?
@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.
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. :/
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.
Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.
Advertising - Terms of Service - Privacy - © 1997-2014, DZone, Inc.