[erlang-questions] Architecture question: logging inside library

Motiejus Jakštys desired.mta@REDACTED
Mon Jan 11 15:18:42 CET 2016


On Mon, Jan 11, 2016 at 8:34 AM, Max Lapshin <max.lapshin@REDACTED> wrote:

> Hi.
>
> As we know, it is good when library doesn't have any hardcoded
> dependencies at all.
>
> I don't understand what is a good way to remove lager (or any other
> logging library) from library dependencies.
>
>
I did something similar in spapi-router, but for reporting metrics rather
than logging:
https://github.com/spilgames/spapi-router#configuration
Example metrics module on top of statsd:
https://github.com/spilgames/spapi-router/blob/master/src/spapi_router_callback_example.erl

The application can specify the module, which implements the necessary
behavior, to do the actual work.

-- 
Motiejus Jakštys
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160111/80dc929b/attachment.htm>


More information about the erlang-questions mailing list