<div dir="ltr"><div>If your intention was to set the effective level [1] for only your loggers, you should reference your loggers by name instead of using the root logger. For example, if all your logger names begin with "backtype.storm" and you wanted only error-level messages, you would use:<br>
</div><div><br></div><div><font face="courier new, monospace"> <configuration></font></div><div><font face="courier new, monospace"> <appender ... /></font></div><div><font face="courier new, monospace"> <logger name="backtype.storm" level="ERROR"/></font></div>
<div><font face="courier new, monospace"> </configuration></font></div><div><br></div><div>Let me know if that works for you.</div><div><br></div><div>[1] <a href="http://logback.qos.ch/manual/architecture.html#effectiveLevel">http://logback.qos.ch/manual/architecture.html#effectiveLevel</a></div>
<div><br></div><div>-Tony</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 9, 2014 at 10:37 AM, Mike Sukmanowsky <span dir="ltr"><<a href="mailto:mike@parsely.com" target="_blank">mike@parsely.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>Hi there,</div><div><br></div><div>We're currently developing project called streamparse which provides Pythonic tools for realtime stream development using Apache Storm.</div>
<div><br></div><div>Although the project is Python-based, we maintain a command line interface, written in clojure, to provide JVM/Thrift interop capabilities <a href="https://github.com/Parsely/streamparse/tree/master/jvm" target="_blank">https://github.com/Parsely/streamparse/tree/master/jvm</a>.</div>
<div><br></div><div>A requirement of one of our commands is to write a JSON object representation to STDOUT which our Python process would read and use downstream. The issue we have is that Apache Storm does some logging using logback upon calling certain functions which interferes with our expectation of only JSON being written to STDOUT.</div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>$ ./sparsej list --json</div><div>607 [main] INFO backtype.storm.thrift - Connecting to Nimbus at localhost:6627</div><div>[{"status":"ACTIVE","num-executors":52,"name":"meta_enricher","num-workers":4,"num-tasks":52,"uptime-secs":1211495,"id":"meta_enricher-49-1398354650"},{"status":"ACTIVE","num-executors":9,"name":"visits","num-workers":4,"num-tasks":9,"uptime-secs":53668,"id":"visits-7-1399512477"},{"status":"ACTIVE","num-executors":80,"name":"ptrack","num-workers":4,"num-tasks":80,"uptime-secs":76148,"id":"ptrack-3-1399489997"}]</div>
</blockquote><div><br></div><div>We added a logback-test.xml to a resources directory which is packaged with the JAR <a href="https://github.com/Parsely/streamparse/blob/master/jvm/resources/logback-test.xml" target="_blank">https://github.com/Parsely/streamparse/blob/master/jvm/resources/logback-test.xml</a>. This isn't exactly what we want though since we really only need logging suppressed for the commands we run. What we're finding when our JAR is packaged with other dependencies is that all logging is suppressed.</div>
<div><br></div><div>How can we go about suppressing logging for a single command like <a href="https://github.com/Parsely/streamparse/blob/master/jvm/src/streamparse/commands/list.clj" target="_blank">https://github.com/Parsely/streamparse/blob/master/jvm/src/streamparse/commands/list.clj</a>?</div>
<div><br></div><div>Thanks! Mike</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div dir="ltr">Mike Sukmanowsky<div><br></div><div>Product Lead, <a href="http://parse.ly" target="_blank">http://parse.ly</a></div>
<div><div><font color="#999999"><div>
12 W 31st Street</div><div>8th floor</div></font></div><div><font color="#999999">New York, NY 10001</font></div></div><div><font color="#999999">p: <a href="tel:%2B1%20%28416%29%20953-4248" value="+14169534248" target="_blank">+1 (416) 953-4248</a></font></div>
<div><font color="#999999">e: <a href="mailto:mike@parsely.com" target="_blank">mike@parsely.com</a></font></div>
</div>
</font></span></div>
<br>_______________________________________________<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" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>