Skip to content

Commit

Permalink
rebar_utils: add metadata to primary logger config
Browse files Browse the repository at this point in the history
  • Loading branch information
Ledest committed Nov 16, 2023
1 parent a16f41a commit ed96d31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/rebar/src/rebar_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -510,12 +510,14 @@ reread_logger_config() ->
%% Extract and apply settings related to primary configuration
%% -- primary config is used for settings shared across handlers
LogLvlPrimary = proplists:get_value(logger_level, KernelCfg, all),
LogMetaPrimary = proplists:get_value(logger_metadata, KernelCfg, #{}),
{FilterDefault, Filters} =
case lists:keyfind(filters, 1, LogCfg) of
false -> {log, []};
{filters, FoundDef, FoundFilter} -> {FoundDef, FoundFilter}
end,
Primary = #{level => LogLvlPrimary,
metadata => LogMetaPrimary,
filter_default => FilterDefault,
filters => Filters},
lists:foreach(fun maybe_reset_logger_handler/1, LogCfg),
Expand Down

0 comments on commit ed96d31

Please sign in to comment.