Hi. No, I do not want to exclude the more severe logging levels, but I want to enable more verbose logging for specific classes for appender A independently of appender Bs logging of those same classes, and vice versa:
Appender A and B is defined. Appender A is logging INFO+ for all by default, while appender B is logging WARN+ for all. Class X is logging DEBUG+more severe levels through appender A, but still logging WARN+more severe levels through appender B. Class Y is logging DEBUG+more severe levels through appender B, but still logging INFO+more severe levels through appender A. + means including more severe logging levels Thanks Fredrik On Wed, Oct 2, 2013 at 9:35 AM, Remko Popma <[email protected]> wrote: > By default, if you set the level of a logger/appender to debug, it will > process debug, info, warn, error and fatal messages. > > Is this what you want, or do you want to include only debug-level messages, > and exclude info, warn, error and fatal messages? > > On Wednesday, October 2, 2013, fedinho wrote: > > > Thanks for your response Jacob. > > > > I've been looking at the additive feature, but I'm not sure it solves my > > requirement. > > > > Given this configuration, I would like to debug class X on appender A, > but > > still keep the info level messages from class X on appender B. > > > > I was hoping that this line would make this happen, but doesn't seem to > > work. > > log4j.logger.classX=debug, A > > > > Is there a simple example similar to my requirements somewhere? > > > > Thanks > > Fredrik > > > > > > On Tue, Oct 1, 2013 at 6:50 PM, Jacob Kjome <[email protected]<javascript:;>> > > wrote: > > > > > On Tue, 1 Oct 2013 18:17:41 +0200 > > > fedinho <[email protected] <javascript:;>> wrote: > > > > > >> Hi. > > >> > > >> A simple question I hope someone can help me with. This is using log4j > > >> 1.2.x > > >> > > >> I would like to log info level to one appender A and warn level to > > another > > >> appenderB. > > >> > > >> However, I would like to log debug messages from class X to appender > A, > > >> and > > >> debug messages from class Y to appender B. > > >> > > >> Thanks for any tips for a configuration that will work. Threshold is > not > > >> the way to go. Is there a way A and B can have different root loggers > or > > >> categories? > > >> > > >> > > > This is usually done by setting the logger additivity to "false" for > > > either the logger in question or one it inherits from, which > essentially > > > makes the logger with additivity=false the root logger for all > > inheritors. > > > See... > > > > > > > > > http://logging.apache.org/**log4j/1.2/manual.html#**Appenders_and_Layouts< > > http://logging.apache.org/log4j/1.2/manual.html#Appenders_and_Layouts> > > > > > > > > > Kind regards > > >> Fredrik > > >> > > > > > > > > > > ------------------------------**------------------------------**--------- > > > To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org< > > [email protected] <javascript:;>> > > > For additional commands, e-mail: log4j-user-help@logging.**apache.org< > > [email protected] <javascript:;>> > > > > > > > > >
