I have the following files in the classpath:<br><br>logback-classic-0.9.9.jar<br>logback-core-0.9.9.jar<br>jcl-over-slf4j-1.5.10.jar<br>log4j-over-slf4j-1.5.10.jar<br>slf4j-api-1.5.10.jar<br><br>and<br>javamail-1.4.3.jar<br>
activation-jaf-1.1.1.jar<br><br>Here is the whole file:<br><br><?xml version="1.0" encoding="UTF-8"?><br><configuration debug="true"><br> <appender name="mainFile" class="ch.qos.logback.core.rolling.RollingFileAppender"><br>
<File>${webapp.root}/WEB-INF/semplest-main.log</File><br> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><br> <FileNamePattern>${webapp.root}/WEB-INF/semplest-main.%d{yyyy-MM-dd}.log</FileNamePattern><br>
<!-- keep 90 days' worth of history --><br> <MaxHistory>90</MaxHistory><br> </rollingPolicy><br> <layout class="ch.qos.logback.classic.PatternLayout"><br>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1} - %msg%n</pattern><br> </layout><br> </appender><br><br> <appender name="errorFile" class="ch.qos.logback.core.rolling.RollingFileAppender"><br>
<File>${webapp.root}/WEB-INF/semplest-error.log</File><br> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><br> <FileNamePattern>${webapp.root}/WEB-INF/semplest-error.%d{yyyy-MM-dd}.log</FileNamePattern><br>
<!-- keep 90 days' worth of history --><br> <MaxHistory>90</MaxHistory><br> </rollingPolicy><br> <!-- deny all events with a level below ERROR --><br> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"><br>
<level>ERROR</level><br> </filter><br> <layout class="ch.qos.logback.classic.PatternLayout"><br> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1} - %msg%n</pattern><br>
</layout><br> </appender><br><br><!-- NOT WORKING --><br> <appender name="email" class="ch.qos.logback.classic.net.SMTPAppender"><br> <SMTPHost><a href="http://smtp.gmail.com">smtp.gmail.com</a></SMTPHost><br>
<SMTPPort>465</SMTPPort><br> <SSL>true</SSL><br> <Username><a href="mailto:yyy@gmail.com">yyy@gmail.com</a></Username><br> <Password>xxx</Password><br>
<To><a href="mailto:zzz@gmail.com">zzz@gmail.com</a></To><br> <From><a href="mailto:aaa@no-reply.com">aaa@no-reply.com</a></From><br> <Subject>SEMPLEST ERROR: %class{20} - %m</Subject><br>
<!-- deny all events with a level below ERROR --><br> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"><br> <level>ERROR</level><br> </filter><br>
<layout class="ch.qos.logback.classic.PatternLayout"><br> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1} - %msg%n</pattern><br> </layout><br> </appender><br>
<!-- --><br> <br> <logger name="com.semplest"><br> <level value="INFO" /><br> </logger><br> <br> <root><br> <level value="WARN" /><br>
<appender-ref ref="mainFile" /><br> <appender-ref ref="errorFile" /><br> <appender-ref ref="email" /><br> </root> <br></configuration><br>
<br>Thanks,<br>Federico<br><br><div class="gmail_quote">On Wed, Mar 10, 2010 at 4:41 AM, Ceki Gülcü <span dir="ltr"><<a href="mailto:ceki@qos.ch">ceki@qos.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
The config file snippet looks good. I really don't see how the error you are seeing could occur. Which version of logback are you using?<br>
<br>
You could you also provide the whole config file?<div class="im"><br>
<br>
On 10/03/2010 12:56 AM, Federico Schroder wrote:<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
Hello, I'm having problems trying to use the gmail example provided<br>
here: <a href="http://logback.qos.ch/manual/appenders.html" target="_blank">http://logback.qos.ch/manual/appenders.html</a><br>
<br>
My config is:<br>
<br>
...<br>
<appender name="email" class="ch.qos.logback.classic.net.SMTPAppender"><br></div>
<SMTPHost><a href="http://smtp.gmail.com" target="_blank">http://smtp.gmail.com</a></SMTPHost><div class="im"><br>
<SMTPPort>465</SMTPPort><br>
<SSL>true</SSL><br>
<Username><a href="mailto:yyy@gmail.com" target="_blank">yyy@gmail.com</a></Username><br>
<Password>xxx</Password><br></div>
<To><a href="mailto:zzz@gmail.com" target="_blank">zzz@gmail.com</a> <mailto:<a href="mailto:zzz@gmail.com" target="_blank">zzz@gmail.com</a>></To><br>
<From><a href="mailto:aaa@no-reply.com" target="_blank">aaa@no-reply.com</a> <mailto:<a href="mailto:aaa@no-reply.com" target="_blank">aaa@no-reply.com</a>></From><div><div></div><div class="h5"><br>
<Subject>APP ERROR: %class{20} - %m</Subject><br>
<!-- deny all events with a level below ERROR --><br>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"><br>
<level>ERROR</level><br>
</filter><br>
<layout class="ch.qos.logback.classic.PatternLayout"><br>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1} - %msg%n</pattern><br>
</layout><br>
</appender><br>
...<br>
<br>
... and I'm getting this in the log:<br>
<br>
19:41:03,031 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@38:16<br>
- no applicable action for [SMTPPort], current pattern is<br>
[[configuration][appender][SMTPPort]]<br>
19:45:30,244 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@39:11<br>
- no applicable action for [SSL], current pattern is<br>
[[configuration][appender][SSL]]<br>
19:45:40,367 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@40:16<br>
- no applicable action for [Username], current pattern is<br>
[[configuration][appender][Username]]<br>
19:45:40,740 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@41:16<br>
- no applicable action for [Password], current pattern is<br>
[[configuration][appender][Password]]<br>
<br>
<br>
Any suggestion on what could be wrong?<br>
Thanks,<br>
Federico<br>
</div></div></blockquote>
_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</blockquote></div><br>