Chicagoboss - How to update lager_file_backend config?

I updated ChicagoBoss to my latest version. When I compile it, I get a notification like

Deprecated lager_file_backend config detected, please consider updating it

I compile it using the following command:

 ./rebar get-deps clean compile

So the questions are:

  • What is lager_file_backend config?
  • Why is it out of date?
  • How to update it.
+4
source share
1 answer
  • lager_file_backend config simply refers to the lager_file_backend section of your configuration file (boss.config)

  • I don’t know why this is out of date, sorry.

  • I was unable to find release notes detailing the differences. I figured out how to update by looking at an example here: https://github.com/basho/lager

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}]}
    ]}
]},
+3

All Articles