From c7bd0eafffb054c30c2bd9f0fc2633fd46acdddd Mon Sep 17 00:00:00 2001 From: +++ Date: Mon, 18 Jul 2022 20:15:25 +0200 Subject: [PATCH] default loglevel auf info gesetzt --- source/server/apistatusd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/server/apistatusd.py b/source/server/apistatusd.py index 461cad6..2b0bbe8 100755 --- a/source/server/apistatusd.py +++ b/source/server/apistatusd.py @@ -267,14 +267,14 @@ def main(): (cve-2011-3389) ''' answer = '3'.encode(encoding='utf-8', errors='strict') - loglevel = logging.WARNING + loglevel = logging.INFO formatstring = '%(asctime)s: %(levelname)s: %(message)s' logging.basicConfig(format=formatstring, level=loglevel) default_config = { 'general': { 'timeout': 3.0, - 'loglevel': 'warning' + 'loglevel': 'info' }, 'server': { 'host': 'localhost', @@ -295,6 +295,7 @@ def main(): 'token': 'aaaaa-bbbbb-ccccc-ddddd-eeeee' } } + logging.info('Try to read config file') configfile = './apistatusd.conf' config = configparser.ConfigParser() config.read_dict(default_config) @@ -309,6 +310,7 @@ def main(): default_config['general']['loglevel']) config.set('general', 'loglevel', default_config['general']['loglevel']) + logging.info('Set loglevel to {}'.format(config['general']['loglevel'].upper())) logger.setLevel(config['general']['loglevel'].upper()) print_config(config)