Pārlūkot izejas kodu

Record some code comments from jrd walk-thru

pull/264/head
Mark Allen pirms 10 gadiem
vecāks
revīzija
f6e6b83927
2 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  1. +6
    -3
      src/lager.app.src
  2. +1
    -1
      src/lager.erl

+ 6
- 3
src/lager.app.src Parādīt failu

@ -44,13 +44,16 @@
%% current one - default is 0
{crash_log_count, 5},
%% Whether to redirect error_logger messages into lager - defaults to true
{error_logger_redirect, true},
{error_logger_redirect, lager_event}, %% <-- sink name
%% How many messages per second to allow from error_logger before we start dropping them
{error_logger_hwm, 50},
%% How big the gen_event mailbox can get before it is switched into sync mode
{async_threshold, 20},
{async_threshold, 20}, %% <-- per sink
%% Switch back to async mode, when gen_event mailbox size decrease from `async_threshold'
%% to async_threshold - async_threshold_window
{async_threshold_window, 5}
{async_threshold_window, 5}, %% <-- per sink
{sinks, [
{lager_event, [{async_threshold, 20}, {async_threshold_window, 5}]}
]},
]}
]}.

+ 1
- 1
src/lager.erl Parādīt failu

@ -116,7 +116,7 @@ do_log(Severity, Metadata, Format, Args, Size, SeverityAsInt, LevelThreshold, Tr
end,
LagerMsg = lager_msg:new(Msg,
Severity, Metadata, Destinations),
case lager_config:get(async, false) of
case lager_config:get(Sink, async, false) of %% this needs to be able to get value from a non-default sink
true ->
gen_event:notify(Pid, {log, LagerMsg});
false ->

Notiek ielāde…
Atcelt
Saglabāt