Re: wm.log time stamp broken?

Keats Kirsch <[email protected]> Tue, 04 Apr 2006 10:55:03 -0400
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
I have also been reading up on SLF4J, and I think I'm convinced that it=20
is a better approach.  For me it's mainly because of the log interface,=20
which seems more elegant and efficient..  They use formatted log=20
messages which avoid having to guard your logging statements with level=20
tests or build up strings that are never used.  I also like that the=20
Log4J founder is behind it.

Keats

Endre St=F8lsvik wrote:

>On Tue, 4 Apr 2006, Endre St=F8lsvik wrote:
>
>| On Mon, 3 Apr 2006, Keats Kirsch wrote:
>|=20
>| | Endre St=F8lsvik wrote:
>| |=20
>| | > I personally use log4j for our server, so log4j would in theory su=
it me
>| | > totally nice, but considering that there are both log4j and the no=
w rather
>| | > prevalent jsr 47 (java.util.logging) and some other fringe stuff, =
it seems
>| | > slightly backwards to go with one specific system.
>| | >=20
>| | > Regards,
>| | > Endre
>| | > =20
>| | I agree.  I think we should look at the JCL
>| | (http://jakarta.apache.org/commons/logging/) since it already provid=
es
>| | adapters for java.logging and Log4J, etc.
>|=20
>| And again, SLF4J.
>|   http://www.slf4j.org/
>|=20
>| This uses a very different "resolving" than clogging (=3D=3Djcl), in t=
hat you=20
>| actually include a specific implementation of the "logging facade": yo=
u=20
>| simply add one of several jars to the classpath, e.g. a slf4j-log4j.ja=
r,=20
>| or slf4j-jsr47.jar, or a simple slf4j-stderr.jar. (Names have been fak=
ed,=20
>| to protect me from actually having to look them up)=20
>|   Ceki G=FClc=FC (the founder of log4j) started this as a reaction to =
lots of=20
>| problems with the clogging-paradigm, that has to do with classloaders =
in=20
>| multi-cl systems, _typically_ servlet containers, tomcat. Since slfj4 =
uses=20
>| a _static_ linking, such problems are thus avoided.
>
>Reading this message, I find that I sound like an evangelist. I'm not.
>
>I just wanted to point out that there are _two_ solutions to the=20
>underlying problem. The oldest is commons logging / jcl / "clogging". Th=
is=20
>doesn't come without problems, in particular in servlet container=20
>scenarios, and to address these problems, slf4j has been developed. Thes=
e=20
>are "very competing" in how they solve the problem at hand.
>
>I'm not sure which one is best - I don't think there is a clear-cut=20
>answer, and the answer will probably be different for different settings=
.=20
>One should be sure that one actually _understand_ the two solutions and=20
>their problems before blasting out with "obviously slf4j is best, always=
!"=20
>or the opposite.
>  But I do think that both solutions must be known by the community befo=
re=20
>a decision is made!
>
>Regards,
>Endre.
>




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting langua=
ge
that extends applications into web and mobile media. Attend the live webc=
ast
and join the prime developer group breaking into this new coding territor=
y!
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat=3D=
121642