erlangchicagoboss

Chicagoboss - How to update lager_file_backend config?


I have updated ChicagoBoss to my latest version. When I'm compiling it, I'm getting a notice as

Deprecated lager_file_backend config detected, please consider updating it

I'm compiling it using following command:

 ./rebar get-deps clean compile

So, the questions are:


Solution

  • Here's what the old style looks like:

    {lager, [
        {handlers, [
          {lager_console_backend, info},
          {lager_file_backend, [
            {"/var/log/foo/boss_error.log", error, 10485760, "$D0", 5},
           {"/var/log/foo/boss_console.log", info, 10485760, "$D0", 5}
          ]}
        ]}
      ]},
    

    Here's what the new style looks like:

    {lager, [
        {handlers, [
          {lager_console_backend, info},
          {lager_file_backend, [{file, "/var/log/foo/boss_error.log"},  {level, error}]},
          {lager_file_backend, [{file, "/var/log/foo/boss_console.log"}, {level, info}]}
        ]}
    ]},