Selaa lähdekoodia

Merge pull request #426 from erlang-lager/adt-otp20-gen_server-no-client

Handle OTP 20 gen_server crash when the client pid is dead
pull/427/head
Mark Allen 7 vuotta sitten
committed by GitHub
vanhempi
commit
4b318422cc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. +3
    -0
      src/error_logger_lager_h.erl

+ 3
- 0
src/error_logger_lager_h.erl Näytä tiedosto

@ -181,6 +181,9 @@ log_event(Event, #state{sink=Sink} = State) ->
{Reason, Name} = case Args of
[N, _Msg, _State, R] ->
{R, N};
[N, _Msg, _State, R, _Client] ->
%% OTP 20 crash reports where the client pid is dead don't include the stacktrace
{R, N};
[N, _Msg, _State, R, _Client, _Stacktrace] ->
%% OTP 20 crash reports contain the pid of the client and stacktrace
%% TODO do something with them

Ladataan…
Peruuta
Tallenna