default loglevel auf info gesetzt

This commit is contained in:
+++ 2022-07-18 20:15:25 +02:00
parent 9fe94d7e6e
commit c7bd0eafff

View file

@ -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)