[logback-user] no applicable action for [encoder], with SMTPAppender
ceki
ceki at qos.ch
Fri Dec 21 20:01:59 CET 2012
Hi Eugen,
SMTPAppender takes a layout not an encoder.
HTH,
--
Ceki
65% of statistics are made up on the spot
On 21.12.2012 19:44, Eugen Paraschiv wrote:
> Hi,
> I am using logback 1.0.9 (along with slf4j 1.7.2); I have defined the
> following appender:
> <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
> <!-- deny all events with a level below ERROR -->
> <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
> <level>ERROR</level>
> </filter>
> <smtpHost>email-smtp.us-east-1.amazonaws.com
> <http://email-smtp.us-east-1.amazonaws.com></smtpHost>
> <username>AKIAJI6XLSOAQX3IW6HQ</username>
> <password>AuSWMdcNObKqGGT550SR/6vDrgh50vxgFrqZHwR2tTED</password>
> <SSL>true</SSL>
> <to>hanriseldon at gmail.com <mailto:hanriseldon at gmail.com></to>
> <from>info at applieddatalabs.com
> <mailto:info at applieddatalabs.com></from>
> <subject>${launchpad.origin}: %logger{20} - %m</subject>
> <encoder
> class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
> <pattern>prov - |${launchpad.origin}| %date [%thread]
> %-5level %logger{36} - %message%n</pattern>
> </encoder>
> <cyclicBufferTracker
> class="ch.qos.logback.core.spi.CyclicBufferTrackerImpl">
> <bufferSize>1000</bufferSize>
> </cyclicBufferTracker>
> </appender>
> And I am now getting:
> 20:41:10,925 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter at 32:72
> - no applicable action for [encoder], current pattern is
> [[configuration][appender][encoder]]
> 20:43:04,138 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter at 33:13
> - no applicable action for [pattern], current pattern is
> [[configuration][appender][encoder][pattern]]
>
> Not sure why that is - I am doing anything wrong on the appender setup?
> Thanks.
> Eugen.
>
> --
> Eugen Paraschiv
> Senior Java Programmer, Optaros
> Mobile: +40728896170
> Blog: www.baeldung.com <http://www.baeldung.com>
> Twitter: https://twitter.com/baeldung
>
More information about the Logback-user
mailing list