From 9aec761ee294e09fbc75c482032943f1d5dc7a88 Mon Sep 17 00:00:00 2001 From: Dennis Siemensma Date: Wed, 19 Feb 2020 22:21:40 +0100 Subject: [PATCH] Restored telegram logging for DEBUG level --- dsmr_datalogger/services.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dsmr_datalogger/services.py b/dsmr_datalogger/services.py index da7ca5504..6d42cde31 100644 --- a/dsmr_datalogger/services.py +++ b/dsmr_datalogger/services.py @@ -23,7 +23,6 @@ dsmrreader_logger = logging.getLogger('dsmrreader') -django_logger = logging.getLogger('django') commands_logger = logging.getLogger('commands') @@ -99,6 +98,8 @@ def telegram_to_reading(data): if params['log_telegrams']: dsmrreader_logger.info('Received telegram (base64 encoded): %s', base64_data) + commands_logger.debug("Received telegram:\n%s", data) + try: parsed_telegram = parser.parse(data) except (InvalidChecksumError, ParseError) as error: @@ -150,7 +151,7 @@ def _map_telegram_to_model(parsed_telegram, data): error_message = 'Discarded telegram with future timestamp(s): {} / {}'.format( model_fields['timestamp'], model_fields['extra_device_timestamp'] ) - django_logger.error(error_message) + commands_logger.error(error_message) raise InvalidTelegramError(error_message) # Now we need to split reading & statistics. So we split the dict here.