Преглед изворни кода

log the ranch error msg

pull/366/head
getong пре 8 година
родитељ
комит
dd21e89a18
1 измењених фајлова са 6 додато и 1 уклоњено
  1. +6
    -1
      src/error_logger_lager_h.erl

+ 6
- 1
src/error_logger_lager_h.erl Прегледај датотеку

@ -189,7 +189,12 @@ log_event(Event, #state{sink=Sink} = State) ->
[Ref, _Protocol, Worker, Reason] -> [Ref, _Protocol, Worker, Reason] ->
?LOGFMT(Sink, error, Worker, ?LOGFMT(Sink, error, Worker,
"Ranch listener ~p terminated with reason: ~s", "Ranch listener ~p terminated with reason: ~s",
[Ref, format_reason(Reason)])
[Ref, format_reason(Reason)]);
[Ref, _Protocol, Ret] ->
%% ranch_conns_sup.erl module line 119-123 has three parameters error msg, log it.
?LOGFMT(Sink, error, undefined,
"Ranch listener ~p terminated with result:~s",
[Ref, format_reason(Ret)])
end; end;
{false, "webmachine error"++_} -> {false, "webmachine error"++_} ->
%% Webmachine HTTP server error %% Webmachine HTTP server error

Loading…
Откажи
Сачувај