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 "Dr. Michael Lipp" <Mi...@danet.de> on 2006/04/18 17:22:14 UTC

Excluding a category from an appender

Hi,

I would like to exclude a category from a specific appender. Is it possible?

Motivation: the root category simply logs everything to the console,
which is perfectly fine. But for a specific category, I would like to
have a special format (because an MDC is available). Now I get the
message twice: once because root category logs it using the default
appender, and once because my specific category logs it with the special
appender. So I would like to exclude this category from the default
(root category) appender.

Regards,

    Michael

-- 
Dr. Michael N. Lipp
Solution Architect

Danet GmbH, Gutenbergstraße 10, 64331 Weiterstadt, Germany
Phone: +49 6151 868-476, Fax: +49 6151 868-264
eMail: Michael.Lipp@danet.de, URL: www.danet.com
-----------------------------------------------------------------------
Managing Board: Dr. Reiner Nickel (CEO), Dr. Burkhard Austermühl (CFO);
Chairman of the Supervisory Board: Jaques Bentz; Address of Record:
Weiterstadt; Commercial Register: Amtsgericht Darmstadt HRB 6450;
Tax Number: DE 172 993 071

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


Re: Excluding a category from an appender

Posted by James Stauffer <st...@gmail.com>.
Set additivity to false on that catagory and the logs won't make it up
to the root appender.

On 4/18/06, Dr. Michael Lipp <Mi...@danet.de> wrote:
> Hi,
>
> I would like to exclude a category from a specific appender. Is it possible?
>
> Motivation: the root category simply logs everything to the console,
> which is perfectly fine. But for a specific category, I would like to
> have a special format (because an MDC is available). Now I get the
> message twice: once because root category logs it using the default
> appender, and once because my specific category logs it with the special
> appender. So I would like to exclude this category from the default
> (root category) appender.
>
> Regards,
>
>     Michael
>
> --
> Dr. Michael N. Lipp
> Solution Architect
>
> Danet GmbH, Gutenbergstraße 10, 64331 Weiterstadt, Germany
> Phone: +49 6151 868-476, Fax: +49 6151 868-264
> eMail: Michael.Lipp@danet.de, URL: www.danet.com
> -----------------------------------------------------------------------
> Managing Board: Dr. Reiner Nickel (CEO), Dr. Burkhard Austermühl (CFO);
> Chairman of the Supervisory Board: Jaques Bentz; Address of Record:
> Weiterstadt; Commercial Register: Amtsgericht Darmstadt HRB 6450;
> Tax Number: DE 172 993 071
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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