浏览代码

Merge pull request #449 from IgorKarymov/master

Bugfix. flush_threshold not working.
pull/457/head
Mark Allen 7 年前
提交者 GitHub
父节点
当前提交
0f30212e1b
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      src/lager_file_backend.erl

+ 4
- 2
src/lager_file_backend.erl 查看文件

@ -83,6 +83,8 @@
{size, non_neg_integer()} | {date, string()} |
{count, non_neg_integer()} | {rotator, atom()} |
{high_water_mark, non_neg_integer()} |
{flush_queue, boolean()} |
{flush_threshold, non_neg_integer()} |
{sync_interval, non_neg_integer()} |
{sync_size, non_neg_integer()} | {sync_on, lager:log_level()} |
{check_interval, non_neg_integer()} | {formatter, atom()} |
@ -431,10 +433,10 @@ validate_logfile_proplist([{flush_queue, FlushCfg}|Tail], Acc) ->
false ->
throw({bad_config, "Invalid queue flush flag", FlushCfg})
end;
validate_logfile_proplist([{flush_queue_threshold, Thr}|Tail], Acc) ->
validate_logfile_proplist([{flush_threshold, Thr}|Tail], Acc) ->
case Thr of
_ when is_integer(Thr), Thr >= 0 ->
validate_logfile_proplist(Tail, [{flush_queue_threshold, Thr}|Acc]);
validate_logfile_proplist(Tail, [{flush_threshold, Thr}|Acc]);
_ ->
throw({bad_config, "Invalid queue flush threshold", Thr})
end;

正在加载...
取消
保存