From 9f4415219f81219592a89df2ca87ee358ac144f6 Mon Sep 17 00:00:00 2001 From: Jan Losinski Date: Thu, 22 Mar 2018 03:11:09 +0100 Subject: [PATCH] More logging in config Signed-off-by: Jan Losinski --- wallabag_kindle_consumer/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wallabag_kindle_consumer/config.py b/wallabag_kindle_consumer/config.py index 60cfbd5..a2087ce 100644 --- a/wallabag_kindle_consumer/config.py +++ b/wallabag_kindle_consumer/config.py @@ -34,6 +34,8 @@ class Config: @staticmethod def from_file(filename): + logger.info("read config from file {file}", file=filename) + if not os.path.exists(filename): logger.warn("Config file {filename} does not exist", filename=filename) return None @@ -65,6 +67,7 @@ class Config: @staticmethod def from_env(): + logger.info("Read config from environment") tmp = {} missing = [] for key in Config.known_values: @@ -72,7 +75,7 @@ class Config: tmp[key] = os.environ[key.upper()] else: if key in Config.required_values: - missing.append(key) + missing.append(key.upper()) if 0 != len(missing): logger.warn("Environment config does not contain configs for: {lst}", lst=", ".join(missing))