Skip to content

Commit

Permalink
Merge pull request #45 from Kyorai/mk-fallback-log-level
Browse files Browse the repository at this point in the history
Don't fail with an 'undefined' log level
  • Loading branch information
michaelklishin authored Aug 3, 2024
2 parents e614d97 + ec658f3 commit 1613ed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cuttlefish_escript.erl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ parse_and_command(Args) ->
main(Args) ->
{Command, ParsedArgs, Extra} = parse_and_command(Args),

SuggestedLogLevel = list_to_atom(proplists:get_value(log_level, ParsedArgs)),
SuggestedLogLevel = list_to_atom(proplists:get_value(log_level, ParsedArgs, "notice")),
LogLevel = case lists:member(SuggestedLogLevel, [debug, info, notice, warning, error, critical, alert, emergency]) of
true -> SuggestedLogLevel;
_ -> notice
Expand Down

0 comments on commit 1613ed7

Please # to comment.