瀏覽代碼

Handle OTP 20 gen_server crash when the client pid is dead

pull/426/head
Andrew Thompson 7 年之前
父節點
當前提交
a11cb946e3
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      src/error_logger_lager_h.erl

+ 3
- 0
src/error_logger_lager_h.erl 查看文件

@ -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

Loading…
取消
儲存