[erlang-questions] Architecture question: logging inside library

Chandru chandrashekhar.mullaparthi@REDACTED
Mon Jan 11 23:15:28 CET 2016


On 11 January 2016 at 18:03, Max Lapshin <max.lapshin@REDACTED> wrote:

> Ok, for example in case of mpegts library, we need to raise upper, up to
> sysadmin (user, not a programmer, he cannot use error_logger output)
> information about status of bitstream like "there are too much errors" or
> "here is a known list of audio channels".
>
>
> This is why I against of error_logger: it's output is for erlang
> programmers, not for sysadmins.
>
> application:get_env — isn't it too bad? Or it is just a ets:lookup?
>
>
get_env(AppName, Key) ->
    case ets:lookup(ac_tab, {env, AppName, Key}) of
[{_, Val}] -> {ok, Val};
_ -> undefined
    end.

Chandru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160111/2418e4fc/attachment.htm>


More information about the erlang-questions mailing list