logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Adding a logger with custom appender pragmatically, without using the ROOT appends for this logger, is this possible?
Date Mon, 21 Jul 2014 14:32:01 GMT
You should specify false for additivity to prevent the automatic
inheritance.


On 21 July 2014 09:20, Nayden Gochev <gochev@gmail.com> wrote:

> In short:
> I am trying to add a custom appender + logger for some package for example
> "org.test"
> However the root appenders (appender refs) are always added as well
> automatically.. so even if I have a root appender(s) with level INFO
> defined in the log4j2.xml,
> ones I add a logger with level DEBUG.. with a new appender (only 1) .. the
> 2 root appenders that I have defined in the XML automatically starts
> receiving this DEBUG messages as well.
>
> Is it possible somehow to REMOVE this ROOT appends.. from my newly created
> logger ?
> newLoggerConfig.getAppenderRefs().clear(); doesn't work of course :)
>
> Thanks for the help,
> much appreciated.
>



-- 
Matt Sicker <boards@gmail.com>

Mime
View raw message