feat(config): Get log level from environment

This commit is contained in:
hygienic-books 2022-07-05 04:46:40 +02:00
parent 2c10e3766d
commit afdc8aa7af

View File

@ -83,7 +83,9 @@ logging.basicConfig(
) )
log = logging.getLogger("rich") log = logging.getLogger("rich")
# Our own code logs with this level # Our own code logs with this level
log.setLevel(logging.DEBUG) log.setLevel(os.environ.get("UFS_LOGLEVEL") if "UFS_LOGLEVEL" in [k for k, v in os.environ.items()] else logging.INFO)
p = inflect.engine()
# Use this version of class ConfigParser to log.debug contents of our config file. When parsing sections other than # Use this version of class ConfigParser to log.debug contents of our config file. When parsing sections other than