[erlang-questions] custom lager levels or filtering

Danil Zagoskin z@REDACTED
Mon Apr 13 18:11:12 CEST 2015

Lager has so-called tracing.
With tracing you can route messages by their metadata.
This feature use is counter-intuitive, you should find some examples of its
use (my example:
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.

On Mon, Apr 13, 2015 at 1:37 AM, Vladimir Gordeev <
gordeev.vladimir.v@REDACTED> wrote:

> 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.
> 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.
> But such entries will still get into default lager file/console backends.
> As far as I see there are several ways to solve this problem:
> 1) Add feature: custom log levels
> 2) Add feature to default backends: filtering by metadata
> Second looks easier. Any other ideas?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Danil Zagoskin | z@REDACTED
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150413/4f1f5d42/attachment.htm>

More information about the erlang-questions mailing list