[logback-user] Issues configuring GMail appender

Greg Silin greg at klout.com
Tue Jan 3 20:26:00 CET 2012


I'm trying to setup logback for a fairly simple appender configuration..

DEBUG, INFO, WARN: System.out Console Appender, File Appender
ERROR: System.err Console Appender, File Appender, SMTPAppender configured
for GMail.

Following instructions to setup GMail appender, I have the following:

Appender config:

    <!-- Email appender -->
    <appender name="MailAppender"

        <to>greg at klout.com</to>
        <!--<to>ANOTHER_EMAIL_DESTINATION</to> <!– additional
destinations are possible –>-->
        <from>noreply at gmail.com</from>
        <subject>LOGGED ERROR: %logger{20} - %m</subject>
        <layout class="ch.qos.logback.classic.PatternLayout">
            <pattern>%date %-5level %logger{35} -

Appender inclusion:

    <root level="ERROR">
        <appender-ref ref="StdErrAppender" />
        <appender-ref ref="FileAppender" />
        <appender-ref ref="MailAppender" />

All appropriate maven dependencies:

logger jars



java mail

All the other appenders work just fine as configured. I see that the
SMTPAppender is being loaded w/o error (at least nothing I see reported) ..
yet on ERROR nothing gets sent.  Username & password are all correct.  I've
confirmed with our operations that we don't have any special spam filters
set up.

Thoughts on what could be wrong / what I need to check?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120103/819e307c/attachment.html>

More information about the Logback-user mailing list