[logback-user] SMTPAppender capturing disabled logging
cheshirator at gmail.com
Mon Mar 18 21:05:26 CET 2013
OK I looked at it some more and I found an error in the declaration
for the logger in my Java.
The logger is in an abstract class that IgnoreMe and a lot of others
extend. I had it reference the base class name directly instead of
using getClass(). This should fix the snafu.
On Mon, Mar 18, 2013 at 3:52 PM, ceki <ceki at qos.ch> wrote:
> Hi Chris,
> The config line
> <logger name="com.a.b.c.IgnoreMe" level="OFF" additivity="false" />
> sets the com.a.b.c.IgnoreMe logger's level to OFF will make sure that no
> logs are generated by said logger. You don't need to set additivity to false
> unless com.a.b.c.IgnoreMe has child loggers.
> So it's impossible for SMTPAppender to receive logging events generated by
> "com.a.b.c.IgnoreMe" logger.
> To control which events trigger email transmission you can set a custom
> evaluator. See
> for more details.
> On 18.03.2013 15:33, Chris Cheshire wrote:
>> This is my (relevant) config structure
>> <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
>> <appender name="FILE"
>> <root level="ERROR">
>> <appender-ref ref="EMAIL" />
>> <appender-ref ref="FILE" />
>> <logger name="com.a" level="INFO" />
>> <logger name="com.a.b.c.IgnoreMe" level="OFF" additivity="false" />
>> I have an SMTPAppender emailing me all errors generated by my webapp.
>> One specific class is generating false positives so I want to turn
>> them off. This has IgnoreMe not logging errors to "FILE", but errors
>> are still making it to "EMAIL".
>> How do I stop them going to the SMTPAppender too?
>> Note : I have more loggers configured for external libraries set to
>> INFO. I'd like to avoid putting appender references in every logger if
> 65% of statistics are made up on the spot
> Logback-user mailing list
> Logback-user at qos.ch
More information about the Logback-user