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 Yang Zhang <ya...@gmail.com> on 2009/07/07 21:13:56 UTC

Specifying non-root loggers in properties files

How do I specify a non-root logger in a Java properties file?  I current 
have the root logger showing output at INFO level and above, but I'm 
interested in debugging one particular class, so I'd like to allow 
DEBUG-level output for that class.  (I always use 
Logger.getLogger(Blah.class).)  I couldn't find any examples of this in 
the documentation or on Google.  Thanks in advance.
-- 
Yang Zhang
http://www.mit.edu/~y_z/

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


Re: Specifying non-root loggers in properties files

Posted by Wendal Chen <we...@gmail.com>.
use this:

lg4j.logger.yourpackage.Blah = DEBUG


2009/7/8 Yang Zhang <ya...@gmail.com>

> How do I specify a non-root logger in a Java properties file?  I current
> have the root logger showing output at INFO level and above, but I'm
> interested in debugging one particular class, so I'd like to allow
> DEBUG-level output for that class.  (I always use
> Logger.getLogger(Blah.class).)  I couldn't find any examples of this in the
> documentation or on Google.  Thanks in advance.
>  --
> Yang Zhang
> http://www.mit.edu/~y_z/ <http://www.mit.edu/%7Ey_z/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>