Started comparing against an atom instead of a string

This commit is contained in:
Kieran Eglin 2024-03-07 11:22:15 -08:00
parent d5282868b5
commit db784780c1
No known key found for this signature in database
GPG key ID: 193984967FCF432D

View file

@ -38,7 +38,7 @@ if config_env() == :prod do
metadata_path = System.get_env("METADATA_PATH", Path.join([config_path, "metadata"])) metadata_path = System.get_env("METADATA_PATH", Path.join([config_path, "metadata"]))
# We want to force _some_ level of useful logging in production # We want to force _some_ level of useful logging in production
acceptable_log_levels = ~w(debug info) acceptable_log_levels = ~w(debug info)a
log_level = String.to_existing_atom(System.get_env("LOG_LEVEL", "info")) log_level = String.to_existing_atom(System.get_env("LOG_LEVEL", "info"))
if log_level in acceptable_log_levels do if log_level in acceptable_log_levels do