[erlang-questions] lager runtime configuration changes

Motiejus Jakštys desired.mta@REDACTED
Fri Feb 10 20:22:01 CET 2012


Sometimes hot changing lager loglevel is not sufficient. Let's say I want to
add a lager backend while system is running (actually, change anything that's
in lager config file). What should I run/execute, after the change/if I know
the new params?

{lager, [
  {handlers, [
    {lager_console_backend, info},
    {lager_file_backend, [
      {"error.log", error, 10485760, "$D0", 5}, % assume I just created this
      {"console.log", info, 10485760, "$D0", 5}

One way would be application:set_env/3. How unsafe is it?


More information about the erlang-questions mailing list