简体   繁体   English

Chicagoboss - 如何更新lager_file_backend配置?

[英]Chicagoboss - How to update lager_file_backend config?

I have updated ChicagoBoss to my latest version. 我已将ChicagoBoss更新为我的最新版本。 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: 所以,问题是:

  • What is lager_file_backend config? 什么是lager_file_backend配置?
  • Why it is deprecated? 为何弃用?
  • How to update it.? 如何更新它。
  • lager_file_backend config simply refers to the 'lager_file_backend' section of your configuration file (boss.config) lager_file_backend config只是引用配置文件的'lager_file_backend'部分(boss.config)

  • I don't know why it is being deprecated, sorry. 我不知道为什么会被弃用,抱歉。

  • I had trouble finding release notes detailing the differences. 我很难找到详细说明差异的发行说明。 I figured out how to update by looking at the example here: https://github.com/basho/lager 我想通过查看这里的示例来了解如何更新: 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}]}
    ]}
]},

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM