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 "Joe Wong (Mango)" <jo...@mango.cc> on 2006/06/06 06:12:23 UTC

different log level and appender for different category

Hi, I am new to Log4j. What is the easiest way to setup log4j so that my application can have different logging level and appender ( different log file ) based on the category name?

Regards,

- Joe

unsubscribe is not working

Posted by Bill Laird <wi...@hotmail.com>.
Hi folks. Sorry for blasting the email, but the unsubscribe is not working, 
and the email address for additional commands bounces. Can anyone assist? I 
am using the following. Thanks.

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

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


Re: different log level and appender for different category

Posted by Javier Gonzalez <ja...@gmail.com>.
First off, "Category" is from older releases. It has been deprecated
and replaced with Logger.

The easiest way to achieve what you want (different log levels and
files for different loggers) is to define different appenders and
attach them to the loggers you want, and disabling additivity to said
loggers. That way their output is restricted to that appender only and
you don't get mixed up output at the root logger.

cheers,

JGN

On 6/6/06, Joe Wong (Mango) <jo...@mango.cc> wrote:
> Hi, I am new to Log4j. What is the easiest way to setup log4j so that my application can have different logging level and appender ( different log file ) based on the category name?
>
> Regards,
>
> - Joe
>
>


-- 
Javier González Nicolini

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