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: Making the log4j library optional
Date Sat, 30 Mar 2002 10:20:06 GMT
At 16:33 29.03.2002 -0700, ajack wrote:
>         > But wrapping the log4j calls in a class of my own won't work
>         > - because then when strings are logged - it will give the
>         > filename and line number of my wrapper method instead of the
>         > filename/line number of the place that the log statement was made.
>
>         You can pass in the name of your wrapper class as the FQCN and 
> then the
>         correct class/line number will be displayed.  Doing this is not a 
> problem.
>         Look for FQCN in the api documentation for Category/Logger.
>
>I downloaded the latest beta and found this, but only on the generic log
>method. If this is a way to pass a class name so the log4j knows to ignore a
>wrapper, could not a setFQCN [or setWrapper] method be added so I can set
>this once, and use the debug/warn/error/fatal type methods?

Remember that your wrapper has to offer replacements for all the printing 
methods of
the Logger (aka Category) class such as debug, info, warn, ...

In each of your replacement methods you call the generic log method. Does 
that make sense?


--
Ceki
My link of the month: http://java.sun.com/aboutJava/standardization/


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


Mime
View raw message