[logback-user] SMTPAppender capturing disabled logging
ceki at qos.ch
Mon Mar 18 20:52:41 CET 2013
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
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" class="ch.qos.logback.core.rolling.RollingFileAppender">
> <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
More information about the Logback-user