Permalink
Browse files

Make the tests pass, show the local name whem the supervisor is {loca…

…l, Name}
  • Loading branch information...
1 parent b8ce2a6 commit 31a1e9e693694a5d96776552bf260e186d245c3f @mworrell committed Mar 7, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/error_logger_lager_h.erl
@@ -98,9 +98,13 @@ handle_event(Event, State) ->
case lists:sort(D) of
[{errorContext, Ctx}, {offender, Off}, {reason, Reason}, {supervisor, Name}] ->
Offender = format_offender(Off),
+ Name1 = case Name of
+ {local, N} -> N;
+ _ -> Name
+ end,
?LOGFMT(error, Pid,
"Supervisor ~w had child ~s exit with reason ~s in context ~w",
- [Name, Offender, format_reason(Reason), Ctx]);
+ [Name1, Offender, format_reason(Reason), Ctx]);
_ ->
?LOGMSG(error, Pid, "SUPERVISOR REPORT " ++ print_silly_list(D))
end;

0 comments on commit 31a1e9e

Please sign in to comment.