commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [logging] Better support for stack walking
Date Mon, 22 Jul 2002 18:50:17 GMT

This is a problem we have on tomcat, as part of the transition
to commons-logging. We would like to be able to preserve the 
existing Logger interface, for backward compatibility and to
allow a smoother transition. 

The problem is that the current implementation of the adapters
will report the class/method who called commons-logging ( i.e.
Logger ).

There are few possible solutions, with little or no effect on
the API. 

The first is to use LogFactory.setAttribute() to pass the information
about the 'wrapper class'. This will be used in walking the 
stack trace or passed to log4j ( or other logger impl. that 
support this ). No API change will be needed.

An alternative is to add a setAttribute() method to Log, or
to add a specialised setWrapperClass() to Log. This will allow
the stack filter to be specified for each log.

What do you think ? We do have a real need for this feature - 
and the impact on API is very small. 


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message