[logback-user] SMTPAppender capturing disabled logging

Chris Cheshire cheshirator at gmail.com
Mon Mar 18 15:33:55 CET 2013


This is my (relevant) config structure
<configuration>

  <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
     ...
  </appender>

  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
     ...
  </appender>

  <root level="ERROR">
    <appender-ref ref="EMAIL" />
    <appender-ref ref="FILE" />
  </root>

  <logger name="com.a" level="INFO" />
  <logger name="com.a.b.c.IgnoreMe" level="OFF" additivity="false" />
</configuration>

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
possible.


Thanks

Chris


More information about the Logback-user mailing list