<div dir="ltr">You can only have a single root element. If you want to filter log events by severity / priority by appender, then you should use the ThresholdFilter filter per appender.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 27, 2017 at 4:42 AM, Thomas Grainger <span dir="ltr"><<a href="mailto:tagrain@gmail.com" target="_blank">tagrain@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I have a config file:<br><br><configuration><br><br> <conversionRule conversionWord="coloredLevel" converterClass="play.api.<wbr>Logger$ColoredLevel" /><br> <contextListener class="com.procensus.backend.<wbr>logging.LoggerStartupListener"<wbr>/><br><br> <appender name="FILE" class="ch.qos.logback.core.<wbr>FileAppender"><br> <file>${application.home}/<wbr>logs/application.log</file><br> <encoder><br> <pattern>%date - [%level] - from %logger in %thread %n%message%n%xException%n</<wbr>pattern><br> </encoder><br> </appender><br><br> <appender name="STDOUT" class="ch.qos.logback.core.<wbr>ConsoleAppender"><br> <encoder><br> <pattern>%coloredLevel %logger{15} - %message%n%xException{5}</<wbr>pattern><br> </encoder><br> </appender><br><br> <appender name="CLOUDWATCH_SYNC" class="ca.pjer.logback.<wbr>AwsLogsAppender"><br> <logRegion>eu-west-1</<wbr>logRegion><br> <logGroupName>procensus/<wbr>backend</logGroupName><br> <logStreamName>${EC2_METADATA_<wbr>IP_ADDRESS}</logStreamName><br> <layout class="ch.qos.logback.contrib.<wbr>json.classic.JsonLayout"><br> <jsonFormatter class="ch.qos.logback.contrib.<wbr>jackson.JacksonJsonFormatter"><br> <prettyPrint>false</<wbr>prettyPrint><br> </jsonFormatter><br> </layout><br> </appender><br><br> <appender name="CLOUDWATCH" class="ch.qos.logback.classic.<wbr>AsyncAppender"><br> <appender-ref ref="CLOUDWATCH_SYNC"/><br> </appender><br><br> <appender name="SENTRY" class="com.getsentry.raven.<wbr>logback.SentryAppender"><br> <dsn><a href="https://redacted:redacted@sentry.io/redacted" target="_blank">https://redacted:<wbr>redacted@sentry.io/redacted</a></<wbr>dsn><br> </appender><br><br> <logger name="play" level="INFO" /><br> <logger name="application" level="DEBUG" /><br><br> <!-- Off these ones as they are annoying, and anyway we manage configuration ourself --><br> <logger name="com.avaje.ebean.config.<wbr>PropertyMapLoader" level="OFF" /><br> <logger name="com.avaje.ebeaninternal.<wbr>server.core.XmlConfigLoader" level="OFF" /><br> <logger name="com.avaje.ebeaninternal.<wbr>server.lib.BackgroundThread" level="OFF" /><br> <logger name="com.gargoylesoftware.<wbr>htmlunit.javascript" level="OFF" /><br> <logger name="com.amazonaws.request" level="OFF" /><br><br> <root level="ERROR"><br> <appender-ref ref="STDOUT" /><br> <appender-ref ref="FILE" /><br> </root><br><br> <root level="INFO"><br> <appender-ref ref="CLOUDWATCH" /><br> </root><br><br> <root level="WARN"><br> <appender-ref ref="SENTRY" /><br> </root><br><br></configuration><br><br></div>However, even though I have root level="WARN" for Sentry, I get all logging events (eg INFO level)<br><br><br><br></div>When I configure a filter, my process doesn't even boot, with no error message at all:<br><br><br><configuration><br><br> <conversionRule conversionWord="coloredLevel" converterClass="play.api.<wbr>Logger$ColoredLevel" /><br> <contextListener class="com.procensus.backend.<wbr>logging.LoggerStartupListener"<wbr>/><br><br> <appender name="FILE" class="ch.qos.logback.core.<wbr>FileAppender"><br> <file>${application.home}/<wbr>logs/application.log</file><br> <encoder><br> <pattern>%date - [%level] - from %logger in %thread %n%message%n%xException%n</<wbr>pattern><br> </encoder><br> </appender><br><br> <appender name="STDOUT" class="ch.qos.logback.core.<wbr>ConsoleAppender"><br> <encoder><br> <pattern>%coloredLevel %logger{15} - %message%n%xException{5}</<wbr>pattern><br> </encoder><br> </appender><br><br> <appender name="CLOUDWATCH_SYNC" class="ca.pjer.logback.<wbr>AwsLogsAppender"><br> <logRegion>eu-west-1</<wbr>logRegion><br> <logGroupName>procensus/<wbr>backend</logGroupName><br> <logStreamName>${EC2_METADATA_<wbr>IP_ADDRESS}</logStreamName><br> <layout class="ch.qos.logback.contrib.<wbr>json.classic.JsonLayout"><br> <jsonFormatter class="ch.qos.logback.contrib.<wbr>jackson.JacksonJsonFormatter"><br> <prettyPrint>false</<wbr>prettyPrint><br> </jsonFormatter><br> </layout><br> </appender><br><br> <appender name="CLOUDWATCH" class="ch.qos.logback.classic.<wbr>AsyncAppender"><br> <appender-ref ref="CLOUDWATCH_SYNC"/><br> </appender><br><br> <appender name="SENTRY" class="com.getsentry.raven.<wbr>logback.SentryAppender"><br> <dsn><a href="https://redacted:redacted@sentry.io/redacted" target="_blank">https://redacted:<wbr>redacted@sentry.io/redacted</a></<wbr>dsn><br> <filter class="ch.qos.logback.classic.<wbr>filter.ThresholdFilter"><br> <level>WARN</level><br> </filter><br> </appender><br><br> <logger name="play" level="INFO" /><br> <logger name="application" level="DEBUG" /><br><br> <!-- Off these ones as they are annoying, and anyway we manage configuration ourself --><br> <logger name="com.avaje.ebean.config.<wbr>PropertyMapLoader" level="OFF" /><br> <logger name="com.avaje.ebeaninternal.<wbr>server.core.XmlConfigLoader" level="OFF" /><br> <logger name="com.avaje.ebeaninternal.<wbr>server.lib.BackgroundThread" level="OFF" /><br> <logger name="com.gargoylesoftware.<wbr>htmlunit.javascript" level="OFF" /><br> <logger name="com.amazonaws.request" level="OFF" /><br><br> <root level="ERROR"><br> <appender-ref ref="STDOUT" /><br> <appender-ref ref="FILE" /><br> </root><br><br> <root level="INFO"><br> <appender-ref ref="CLOUDWATCH" /><br> </root><br><br> <root level="WARN"><br> <appender-ref ref="SENTRY" /><br> </root><br><br></configuration><span class="HOEnZb"><font color="#888888"><br><div><br clear="all"><div><div><div><div class="m_-8790679302490206066gmail_signature">Thomas Grainger</div></div>
</div></div></div></font></span></div>
<br>______________________________<wbr>_________________<br>
logback-user mailing list<br>
<a href="mailto:logback-user@qos.ch">logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/logback-user</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><table style="font-size:12.8px;border:none;border-collapse:collapse"><tbody><tr style="height:167px"><td style="border:1px solid rgb(255,255,255);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:0pt;margin-right:5pt"><font size="1"><span style="font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><img src="https://lh6.googleusercontent.com/WYeu84rijHA9DnlNpowhtHIkbXm-fNOEmMXbaM9QdZOpIs8fXg7mfWjQ44WzQz6JgcptFWq4MSjLu-CIhdcEU75IPR-FelHpEoMX7jU_h1S4hvD2TOOijrQlNW0Wts7MBstczHU" width="96" height="82" alt="email-signature-logo.jpg" style="border:none"></span></font></p></td><td style="border:1px solid rgb(255,255,255);vertical-align:top;padding:7px"><p dir="ltr" style="margin-top:0pt;margin-bottom:0pt"><font color="#676767" face="Calibri" size="2"><span style="line-height:14.08px;white-space:pre-wrap"><b>Andy Feller</b></span></font></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font size="2"><span style="font-family:Calibri;color:rgb(132,139,148);font-style:italic;vertical-align:baseline;white-space:pre-wrap">Sr. DevOps Engineer<br></span><span style="font-family:Calibri;color:rgb(132,139,148);vertical-align:baseline;white-space:pre-wrap">900 Main Campus Drive, Suite 500</span></font></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Calibri;color:rgb(132,139,148);vertical-align:baseline;white-space:pre-wrap"><font size="2">Raleigh, NC 27606</font></span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font size="2"><span style="color:rgb(25,98,207);text-decoration:underline;font-family:Calibri;vertical-align:baseline;white-space:pre-wrap"><a href="http://www.bandwidth.com/" style="color:rgb(17,85,204);text-decoration:none" target="_blank">Bandwidth</a></span><a href="http://www.bandwidth.com/" target="_blank"><span style="color:rgb(103,103,103);text-decoration:none;font-family:Calibri;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></a></font><span style="font-size:small;line-height:1.2;font-family:Calibri;color:rgb(103,103,103);font-weight:700;vertical-align:baseline;white-space:pre-wrap">e</span><span style="font-size:small;line-height:1.2;font-family:Calibri;color:rgb(128,128,128);vertical-align:baseline;white-space:pre-wrap"> </span><a href="mailto:afeller@bandwidth.com" style="font-size:small;line-height:1.2;color:rgb(17,85,204);text-decoration:none" target="_blank"><span style="font-family:Calibri;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">afeller@bandwidth.com</span></a></p></td></tr></tbody></table></div></div></div></div>
</div>