Skip to content

Commit 75313ab

Browse files
author
José Valim
committed
Add catch all for bad supervisor names
Otherwise if a different supervisor implementation, such as a `ConsumerSupervisor` in GenStage, pass a different name by accident, logging would fail. Closes #8126.
1 parent 570d44b commit 75313ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/logger/lib/logger/translator.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ defmodule Logger.Translator do
332332
defp sup_name({:global, name}), do: inspect(name)
333333
defp sup_name({:via, _mod, name}), do: inspect(name)
334334
defp sup_name({pid, mod}), do: [inspect(pid), " (", inspect(mod), ?)]
335+
defp sup_name(unknown_name), do: inspect(unknown_name)
335336

336337
defp sup_context(:start_error), do: "failed to start"
337338
defp sup_context(:child_terminated), do: "terminated"

0 commit comments

Comments
 (0)