logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Taylor <donald_l_taylor...@yahoo.com>
Subject Re: FQCN Category.log() question
Date Thu, 02 Aug 2001 11:33:20 GMT
I think what you want to do is this:

Category.getInstance(callerFQCN).log(priority, message, t);

The problem with your approach is you're always working with the root
category, which isn't what you want.

-- Don 

--- Scot Hale <halesm@hotmail.com> wrote:
> I currently converted the logging in my webapplication to use log4j
> 1.1.3 via a wrapper class.  So everything in the application, various
> packages, log via the function call in one class:
> 
>     Category.getRoot().log(String callerFQCN, Priority priority,
> Object message, Throwable t) 
> 
> I am running into a problem setting logging priorities for different
> categories, because everything is seen as coming from the category
> class root, instead of the passed Fully Qualified Class Name.
> 
> My properties are set up as:
> 
> log4j.rootCategory=FATAL,sizeAppender
> 
> log4j.category.a.subclass=DEBUG
> log4j.additivity.a.subclass=false
> 
> Is there anyway to make a category priority under the rootCategory
> log, using the Category method log(String callerFQCN, Priority
> priority, Object message, Throwable t)?
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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


Mime
View raw message