Skip to content

Commit 77fa0c4

Browse files
committed
Handle new significant key in sasl reports
1 parent 3842dcc commit 77fa0c4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/logger/lib/logger/translator.ex

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,22 @@ defmodule Logger.Translator do
357357
[]
358358
end
359359

360-
defp child_debug(:debug, restart_type: restart, shutdown: shutdown, child_type: type) do
361-
["\nRestart: ", inspect(restart), "\nShutdown: ", inspect(shutdown)] ++
362-
["\nType: ", inspect(type)]
360+
defp child_debug(:debug, opts) do
361+
for {key, value} <- opts do
362+
child_debug_key(key, value)
363+
end
363364
end
364365

365366
defp child_debug(_min_level, _child) do
366367
[]
367368
end
368369

370+
defp child_debug_key(:restart_type, value), do: ["\nRestart: " | inspect(value)]
371+
defp child_debug_key(:shutdown, value), do: ["\nShutdown: " | inspect(value)]
372+
defp child_debug_key(:child_type, value), do: ["\nType: " | inspect(value)]
373+
defp child_debug_key(:significant, value), do: if(value, do: "\nSignificant: true", else: [])
374+
defp child_debug_key(_, _), do: []
375+
369376
defp report_crash(min_level, [[{:initial_call, initial_call} | crashed], linked]) do
370377
mfa = initial_call_to_mfa(initial_call)
371378
report_crash(min_level, crashed, [{:initial_call, mfa}], linked)

0 commit comments

Comments
 (0)