Skip to content

Commit

Permalink
Don't fail with an 'undefined' log level
Browse files Browse the repository at this point in the history
when an unknown CLI argument is provided.

References #44.
  • Loading branch information
michaelklishin committed Aug 3, 2024
1 parent e614d97 commit ec658f3
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 ec658f3

Please sign in to comment.