From 43d304038e0d43082cf2333c9bdc2f1b1543bb84 Mon Sep 17 00:00:00 2001 From: Igor Karymov Date: Tue, 27 Mar 2018 19:04:40 +0300 Subject: [PATCH] Bugfix. flush_threshold not working. Fix incorrect option name validation. --- src/lager_file_backend.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lager_file_backend.erl b/src/lager_file_backend.erl index 5dbbcbc..f861717 100644 --- a/src/lager_file_backend.erl +++ b/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;