logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Plans for supporting a build in level of "trace"
Date Wed, 24 Sep 2003 13:25:15 GMT

Although catering for user requests is one of the guiding principles
behind this project, I feel that introducing the TRACE level would be
a mistake. Log4j domains which will be soon introduced into log4j
provide a much more powerful mechanism for categorizing logging

Please bear with me for a few more days.

See also below.

At 11:23 AM 9/24/2003 +1000, Paul Smith wrote:
>IMHO, the simplicity of Debug/info/warn/error/fatal is one of Log4j's
>strengths. I personally would not want Trace  However, if I required
>Trace-style logging, I would simply log to a dotted logger name
>E.g If I have a component "com.mycompany.mycomponent", I have a
>complimentary "com.mycomany.mycomponent.trace" logger, and configure
>Log4j to suppress this logger under normal circumstances.

Log4j domains are/will be your friend.

>The other advantage to this approach is that you can get all Trace style
>logs into their own appender very easily (attach the appropriate
>appender to each .trace logger in the config), which means my trace logs
>are separated easily from the other debug, which I think is what a lot
>of people are worried about.  I can't see anyone wanting to wade through
>Trace AND Debug log messages to find things out, but maybe I can't see
>the use case that other people have.

Did I mention log4j domains?

>Having said all this, as a Log4j developer I wonder since we've
>previously made a lot of effort to match JDK 1.4's syntax (e.g.
>Category->Logger, Priority->Level), one might argue that it's not too
>much effort to go that extra mile to just add the Trace level for those
>that way inclined.
>Perhaps those log4j dev-people who were involved in the Log4j-JDK1.4
>matching development might be able to comment on any rationale etc.  But
>for me, I'm very happy with the current Trace-less log4j.

The idea was to be as friendly as possible to the JDK 1.4 users
migrating to log4j from JDK 1.4 logging. As a whole, it was a good
move although renaming priority to level was probably not worth the

Once log4j 1.3 is introduced, developers will realize how much more
advanced the log4j API is compared to JDK 1.4 logging.

>Paul Smith

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp

      import org.apache.Facetime;
      ApacheCon US 2003, 18-21 November http://apachecon.com/

To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

View raw message