5 ms·
I'm curious (it's a long time since I programmed in Java) - what is the java logging disaster?
by mooism2 12y ago
I'm curious (it's a long time since I programmed in Java) - what is the java logging disaster?
- thescrewdriver 12y agoJust 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.
- jburwell 12y agoWhich 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).
- MrBuddyCasino 12y agoRight - fixing it in that case means "do the same as thing as with Joda, but do it with slf4j and logging instead".
- jburwell 12y agoAt 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.
- smackfu 12y agoBeyond 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.
- yawz 12y agoLogback (next gen log4j): http://logback.qos.ch/ http://logback.qos.ch/
- jhawk28 12y agoLog4j 2 (next gen logback): http://logging.apache.org/log4j/2.x/ http://logging.apache.org/log4j/2.x/
- dclusin 12y agoThanks for sharing this. Curious where you get your java framework/cool api news from? I hadn't heard about this.
- deepsun 12y agoCurious, why Ceki Gülcü (Log4J author) is no longer in team?
- burkaman 12y agoCeki 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/200704.mbox/%3C20070404194653.9F87F36CC1@mail.qos.ch%3E http://mail-archives.apache.org/mod_mbox/logging-log4j-dev/2...
- LambdaAlmighty 12y agoJava's analogy of Python's "py3k dual-compatibility" disaster. Only not as severe or fundamental.
- deleted 12y ago[deleted]