> I see your point here, but the suggested usage for implementing trace() is
> just plain ugly. I would still suggest that we use our own Logger class
> which has all of the features and niceness which we desire, but uses Log4j
> as the underlying mechanism.
>
> I have been playing with logging systems for several years now, and I am
> coming to the conclusion that there is no single perfect logging api for
> application use. I am starting to think that each platform (like JBoss)
> should provide it's own interface, but leave the details of event
> management, configuration and the like, to a package like Log4j.
I used to be of the same opinion, but think that when you have logging
disabled you want it as fast as possible (AFAIK it involves keeping as
little inheritance as possible and so on). Unless you keep programming in
the isDebugEnabled() way or implement it again in that thin layer, you'll
get a bit slower system (remember that the log is called hundreds of times).
You can also wait until the API JSR047 that Sun is developing matures and
see what it's like:
http://jcp.org/aboutJava/communityprocess/review/jsr047/index.html
P.S.: The "isDebugEnabled way" as far as I remember from memory, involves
checking the debugging state before calling the log method, to avoid
calculating the parameters when there is no need:
if (isDebugEnabled())
log.debug("Parameters = " + param1 + ", " + param2);
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development