Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Absolutely, good thing they've learned from the java logging disaster. I nerdrage so hard every time I think about it - how can one mess up something so basic, yet so important? Maybe some sunny day, they'll fix that too.


I'm curious (it's a long time since I programmed in Java) - what is the java logging disaster?


Beyond actual capabilities of log4j vs JDK logging, it's not clear that anyone considered how adoption would work. At the time, log4j supported several back versions of the JDK, while JDK logging obviously required you to be on the newest version, v1.4. As a result, if a library wanted to support any older JDKs, they couldn't switch to JDK logging, or had to support two parallel logging frameworks for little gain. And if your libraries are sticking with log4j, what's the advantage to your program of using the JDK logging?

slf4j is the current solution for this kind of problem, a common interface to various different logging solutions.


Logback (next gen log4j): http://logback.qos.ch/


Log4j 2 (next gen logback): http://logging.apache.org/log4j/2.x/


Thanks for sharing this. Curious where you get your java framework/cool api news from? I hadn't heard about this.


Curious, why Ceki Gülcü (Log4J author) is no longer in team?


Ceki left Log4J to develop Logback, I think because he felt like he had lost control of the project.

"For me, starting a new project was a lot worse than just "disheartening". The SLF4J vote was just the straw that broke the camel's back. After putting many many hours of work into log4j, it became increasingly painful to waste time in arguments, where opinions got asserted by the one writing the longest email. Not fun."

- http://mail-archives.apache.org/mod_mbox/logging-log4j-dev/2...


Just about every project used Log4j. When they added logging to the JDK they shipped logging support which was worse than what everyone was already using (log4j), so adoption was very limited.


Which in turn gave rise to the horrors of commons-logging (clogging) attempting to wrap both APIs and magically detect your logging framework with nasty classloader tricks. While slf4j is a very sane and useful wrapper, it shouldn't be necessary -- JDK logging should have been the wrapper API providing an SPI to plugin implementations (e.g. log4j, logback, etc).


Right - fixing it in that case means "do the same as thing as with Joda, but do it with slf4j and logging instead".


At this point, it is attempting the close the barn door after the horses have run half way around the world. Too much many systems have been built up on clogging and SLF4J. "Fixing" it now just add a third wrapper to the mix would not be a Good Thing(tm), IMHO. Sadly, it's as fixed as it is ever going to get at this point.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: