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.

By the way, JSF isn't limited to "j2ee containers". Simple servlet containers are also enough.


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.

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.

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

Reply via email to