logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Womack <mwom...@bevocal.com>
Subject RE: Making the log4j library optional
Date Mon, 01 Apr 2002 16:58:24 GMT

You only need to pass in a custom FQCN (fully-qualified class name) when you
subclass or wrap the Category/Logger class.  There is no setter method that
I am aware of, but the log() and forcedLog() methods will take it as a
parameter.  Such a method might be nice, but since it is only really useful
for wrappers/subclasses, I guess the thinking is that you will just deal
with it at that level.  ie the wrapper's debug() method (or whatever method)
will call the log() method with the correct parameters (all the logging
methods end up calling the log() method anyways).

Hope it helps,

> -----Original Message-----
> From: ajack [mailto:ajack@openbiz.biz]
> Sent: Friday, March 29, 2002 3:34 PM
> To: 'Log4J Users List'
> Subject: RE: Making the log4j library optional
> 	> 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?
> regards
> Adam
> --
> To unsubscribe, e-mail:   
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:log4j-user-help@jakarta.apache.org>

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

View raw message