You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mark Womack <mw...@bevocal.com> on 2002/04/01 18:58:24 UTC

RE: Making the log4j library optional

Adam,

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,
-Mark

> -----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:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>