From 61b33d5b728da4dedbbffc559e47651f994c5f67 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 2 Aug 2021 16:43:49 +0200 Subject: [PATCH] Move log-start-msg to function --- daemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index 3e8448c..aa2b38d 100755 --- a/daemon.py +++ b/daemon.py @@ -7,7 +7,7 @@ import dnslib as dns config = None def main(args): setupLogging(True) - log.debug("Logging started") + global config config = readConfig("/data/config.yml") @@ -101,6 +101,7 @@ def setupLogging(verbose: bool): level = log.DEBUG log.basicConfig(stream=sys.stdout, format=format, level=level) + log.debug("Logging started") def readConfig(file: str): log.debug(f"Reading config '{file}'..")