Skip to content
This repository
Browse code

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
  • Loading branch information...
commit 2fd7945f47f354eb54efbc50966ac125392b331c 2 parents 8591d1f + 6fdbe25
Andrew Thompson authored September 19, 2011

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  src/error_logger_lager_h.erl
7  src/error_logger_lager_h.erl
@@ -159,14 +159,15 @@ format_crash_report(Report, Neighbours) ->
159 159
         [Name, length(Neighbours), format_reason(Reason)]).
160 160
 
161 161
 format_offender(Off) ->
162  
-    case proplists:get_value(name, Off) of
  162
+    case proplists:get_value(mfargs, Off) of
163 163
         undefined ->
164 164
             %% supervisor_bridge
165 165
             io_lib:format("at module ~w at ~w",
166 166
                 [proplists:get_value(mod, Off), proplists:get_value(pid, Off)]);
167  
-        Name ->
  167
+        MFArgs ->
168 168
             %% regular supervisor
169  
-            MFA = format_mfa(proplists:get_value(mfargs, Off)),
  169
+            MFA = format_mfa(MFArgs),
  170
+            Name = proplists:get_value(name, Off),
170 171
             io_lib:format("~w started with ~s at ~w",
171 172
                 [Name, MFA, proplists:get_value(pid, Off)])
172 173
     end.

0 notes on commit 2fd7945

Please sign in to comment.
Something went wrong with that request. Please try again.