Browse Source

Tweak

adt/lager_use_logger-option
Andrew Thompson 6 years ago
parent
commit
c793c030d0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/lager_logger_formatter.erl

+ 2
- 2
src/lager_logger_formatter.erl View File

@ -36,11 +36,11 @@ format(#{level := Level, msg := {report, #{label := {supervisor, progress}, repo
{id, ChildID} -> {id, ChildID} ->
case lists:keyfind(pid, 1, Started) of case lists:keyfind(pid, 1, Started) of
{pid, Pid} -> {pid, Pid} ->
lager_format:format("Supervisor ~w started child ~s at pid ~w", [Name, ChildID, Pid], maps:get(max_size, Config, 1024));
lager_format:format("Supervisor ~w started child ~p at pid ~w", [Name, ChildID, Pid], maps:get(max_size, Config, 1024));
false -> false ->
%% children is a list of pids for some reason? and we only get the count %% children is a list of pids for some reason? and we only get the count
{nb_children, ChildCount} = lists:keyfind(nb_children, 1, Started), {nb_children, ChildCount} = lists:keyfind(nb_children, 1, Started),
lager_format:format("Supervisor ~w started ~b children ~s", [Name, ChildCount, ChildID], maps:get(max_size, Config, 1024))
lager_format:format("Supervisor ~w started ~b children ~p", [Name, ChildCount, ChildID], maps:get(max_size, Config, 1024))
end end
end, end,
do_format(Level, Msg, Metadata, Config); do_format(Level, Msg, Metadata, Config);

Loading…
Cancel
Save