Commit 8e4d5091 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes config files

No related merge requests found
Showing with 3 additions and 1 deletion
+3 -1
......@@ -60,6 +60,7 @@ DATA_LOGGING_CONFIG = {
# State of Health logging configuration (For a future release)
SOH_LOGGING_CONFIG = {
'logging_level': logging.INFO,
'log_file_logging_level': logging.DEBUG,
'logging_to_console': True,
'file_name': f'soh{logging_suffix}.log',
'max_bytes': 16777216,
......
......@@ -69,6 +69,7 @@ DATA_LOGGING_CONFIG = {
# State of Health logging configuration (For a future release)
SOH_LOGGING_CONFIG = {
'logging_level': logging.INFO,
'log_file_logging_level': logging.DEBUG,
'logging_to_console': True,
'file_name': f'soh{logging_suffix}.log',
'max_bytes': 16777216,
......
......@@ -58,7 +58,7 @@ def setup_loggers(mqtt=True):
if mqtt:
mqtt_settings = MQTT_LOGGING_CONFIG.copy()
mqtt_soh_logging_level = mqtt_settings.pop('soh_logging_level', logging.DEBUG)
[mqtt_settings.pop(i) for i in ['client_id', 'exec_topic', 'data_topic', 'soh_topic', 'data_logging_level',
[mqtt_settings.pop(i, None) for i in ['client_id', 'exec_topic', 'data_topic', 'soh_topic', 'data_logging_level',
'soh_logging_level']]
mqtt_settings.update({'topic': MQTT_LOGGING_CONFIG['soh_topic']})
# TODO: handle the case of MQTT broker down or temporarily unavailable
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment