On 1/11/06, Simon Kitching <[EMAIL PROTECTED]> wrote: > Adam Winer wrote: > > On 1/11/06, Manfred Geiler <[EMAIL PROTECTED]> wrote: > >> 2006/1/10, Korhonen, Kalle <[EMAIL PROTECTED]>: > >>> If one really wants to combine java logging to log4jLogs, I'd think you > >>> should be able to fairly easily write a java log handler using log4j > >>> logger (don't know how the performance of such a beast would be > >>> though...). > >> And here we go: configurate logging in a central (!) logger.properties > >> file that sits in the JRE lib dir. Aaaargh. Think of multiple > >> container or application instances on one machine. > >> A log4j.xml file in my container, that I can change during runtime > >> (like in JBoss) - that's what really rocks! > > > > A good J2EE 1.4 container should support configuring java.util.logging > > per app. Any that do not support this are missing an important feature. > > Ahh..but how many containers really do provide a proper > java.util.logging implementation? > > Apache Tomcat only added this feature fairly recently (JULI): > http://tomcat.apache.org/tomcat-5.5-doc/logging.html > > And if the container doesn't have it, then any library that uses > java.util.logging becomes effectively unusable in that container. That's > a big problem.
Well, that's Tomcat and OC4J then. I honestly don't know how many others do this correctly - but I do know that it's their responsibility to do so. I'm also talking about the JSF 1.2 timeframe, which is Java EE 5-based. If someone produces an EE 5 container that doesn't support java.util.logging correctly, they deserve the loss of marketshare that they get, and we shouldn't spend time working around their lameness. > By the way, JSF isn't limited to "j2ee containers". Simple servlet > containers are also enough. Well, yep - same logic applies, though. Instead of J2EE containers, I should say J2EE Web containers, or something like that. > > > > You're completely correct that commons-logging should be used for > > MyFaces as long as the JDK 1.3 requirement stands - but moving > > forward, java.util.logging is the standard, and that's what MyFaces > > should use, even if log4j has technical advantages. > > The attitude of Sun is sometimes astounding. It's incredible that with > all the good logging systems out there, they should decide to invent > their own inferior one. But as you say, it's part of the spec so for > good or bad it's probably best to use it when we can assume java1.4 or > later. Well, yeah. It's part of the sadness of the tech world that the "best" technology is only sometimes what actually wins; "good enough" + good marketing is the truly essential combination. I'm inured to the pain of this reality by now. BTW, if you replace "logging systems" with "web application frameworks", you have exactly what many have said about JSF... > BTW, java.util.logging is really just an API, with a simple default > implementation. In fact, a default implementation so simple it's > basically unusable, but that's ok as containers are supposed to override it. Yep, I agree. -- Adam > Is it possible to provide a java.util.logging implementation that is > just a bridge to log4j? I haven't seen this done, but as noted above > j.u.l is really an API not an implementation... > > > Regards, > > Simon >
