[slf4j-dev] Re: TRACE level

Greg Wilkins gregw at mortbay.com
Tue Jul 5 20:17:29 CEST 2005


Ceki,

Very good point about the different type of warnings.  
I'm coming around to the marker mind set.

As niclas says, it is a 2D space of logs, where
one axis is fixed by the log system:  debug,info,warn,error
and the other axis is controlled by the developer and is
arbitrary.

In fact, thinking of it in that way is a good reason to only
have 2D and not 3D logging.

I can now see things like:

   log.error(LogSupport.FATAL,"shit happened",e);
   log.error(LogSupport.TRANSIENT,"try again",e);

   log.warn(LogSupport.SECURITY,"Break in attempt on port {}",port);
   
   log.debug(LogSupport.TRACE,"entered method and too lazy to use IDE");
   log.debug(LogSupport.VERBOSE,"{}",bigObject);


I'm now sold on Markers rather than another debug level.

But I'm still a little cautious about

   log.debug(LogSupport.STACK,LogSupport.IGNORED,e);

because unless it is in the API it will be widely used.
I really think the world needs log.ignore(Throwable th) and the
advent of slf4j is a great chance to introduce it.


Perhaps it can be put in the API as a conveniance method that is
equivalent to:

  void ignore(Throwable th)
  {
     log.debug(Marker.getMarker("ignore"),"ignore",th);
  }

cheers






More information about the slf4j-dev mailing list