Browse Source

Merge pull request #16 from basho/adt-simple_one_for_one-crash-report

Use mfargs instead of name attribute as the way to detect supervisor_bridge
pull/22/head
Andrew Thompson 13 years ago
parent
commit
2fd7945f47
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/error_logger_lager_h.erl

+ 4
- 3
src/error_logger_lager_h.erl View File

@ -159,14 +159,15 @@ format_crash_report(Report, Neighbours) ->
[Name, length(Neighbours), format_reason(Reason)]).
format_offender(Off) ->
case proplists:get_value(name, Off) of
case proplists:get_value(mfargs, Off) of
undefined ->
%% supervisor_bridge
io_lib:format("at module ~w at ~w",
[proplists:get_value(mod, Off), proplists:get_value(pid, Off)]);
Name ->
MFArgs ->
%% regular supervisor
MFA = format_mfa(proplists:get_value(mfargs, Off)),
MFA = format_mfa(MFArgs),
Name = proplists:get_value(name, Off),
io_lib:format("~w started with ~s at ~w",
[Name, MFA, proplists:get_value(pid, Off)])
end.

Loading…
Cancel
Save