<div dir="ltr">Lager has so-called tracing.<div>With tracing you can route messages by their metadata.</div><div>This feature use is counter-intuitive, you should find some examples of its use (my example: <a href="https://github.com/stolen/erdico/blob/e71870c6bf045364cf3250772271f49a13352b5e/erdico.config">https://github.com/stolen/erdico/blob/e71870c6bf045364cf3250772271f49a13352b5e/erdico.config</a>)</div><div>I don't know if it is possible to completely separate traced events from ordinary handlers, i just use lower severity for traced messages than for configured global logs.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 13, 2015 at 1:37 AM, Vladimir Gordeev <span dir="ltr"><<a href="mailto:gordeev.vladimir.v@gmail.com" target="_blank">gordeev.vladimir.v@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">Let me describe my problem. I have two different kinds of logging inside my code: regular console/file output and special log calls that should be processed by my log backend. By their meaning and usage they are completely separate.<div><br></div><div>Semantically both logs actually are info level, but still they should be handled separately. I can add metadata to my specific logs, and select such marked log entries in my custom backed.</div><div><br></div><div>But such entries will still get into default lager file/console backends.</div><div><br></div><div>As far as I see there are several ways to solve this problem:</div><div><br></div><div>1) Add feature: custom log levels<br>2) Add feature to default backends: filtering by metadata<br><br>Second looks easier. Any other ideas?</div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><font face="'courier new', monospace">Danil Zagoskin | <a href="mailto:z@gosk.in" target="_blank">z@gosk.in</a></font></div></div></div>
</div>