Handle new significant key in sasl reports

This commit is contained in:
José Valim
2021-04-23 17:16:44 +02:00
parent cdf2d3932f
commit df65074a81
+10 -3
View File
@@ -355,15 +355,22 @@ defmodule Logger.Translator do
[]
end
defp child_debug(:debug, restart_type: restart, shutdown: shutdown, child_type: type) do
["\nRestart: ", inspect(restart), "\nShutdown: ", inspect(shutdown)] ++
["\nType: ", inspect(type)]
defp child_debug(:debug, opts) do
for {key, value} <- opts do
child_debug_key(key, value)
end
end
defp child_debug(_min_level, _child) do
[]
end
defp child_debug_key(:restart_type, value), do: ["\nRestart: " | inspect(value)]
defp child_debug_key(:shutdown, value), do: ["\nShutdown: " | inspect(value)]
defp child_debug_key(:child_type, value), do: ["\nType: " | inspect(value)]
defp child_debug_key(:significant, value), do: if(value, do: "\nSignificant: true", else: [])
defp child_debug_key(_, _), do: []
defp report_crash(min_level, [[{:initial_call, initial_call} | crashed], linked]) do
mfa = initial_call_to_mfa(initial_call)
report_crash(min_level, crashed, [{:initial_call, mfa}], linked)