Przeglądaj źródła

Fix cowboy error handling

pull/110/head
Andrew Thompson 12 lat temu
rodzic
commit
becce00d3e
1 zmienionych plików z 2 dodań i 2 usunięć
  1. +2
    -2
      src/error_logger_lager_h.erl

+ 2
- 2
src/error_logger_lager_h.erl Wyświetl plik

@ -95,12 +95,12 @@ handle_event(Event, State) ->
?LOGFMT(error, Pid,
"Cowboy handler ~p terminated with reason: call to undefined function ~p:~p/~p",
[Module, Module, Function, Arity]);
[Module, Function, Arity | Tail] ->
[Module, Function, Arity, _Class, Reason | Tail] ->
%% any other cowboy error_format list *always* ends with the stacktrace
StackTrace = lists:last(Tail),
?LOGFMT(error, Pid,
"Cowboy handler ~p terminated in ~p:~p/~p with reason: ~s",
[Module, Module, Function, Arity, format_reason(StackTrace)])
[Module, Module, Function, Arity, format_reason({Reason, StackTrace})])
end;
"webmachine error"++_ ->
%% Webmachine HTTP server error

Ładowanie…
Anuluj
Zapisz