From 1515517768263a8ec00181952d16250e4cff8912 Mon Sep 17 00:00:00 2001 From: Dennis Siemensma Date: Wed, 12 May 2021 19:10:00 +0200 Subject: [PATCH] Update URL to logging level docs --- dsmr_backend/mixins.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dsmr_backend/mixins.py b/dsmr_backend/mixins.py index ed691c8cc..c858ecd61 100644 --- a/dsmr_backend/mixins.py +++ b/dsmr_backend/mixins.py @@ -144,13 +144,15 @@ def _remove_pid_file(self): def _check_logger_level(self): logging_level = logger.getEffectiveLevel() - if logging_level > logging.INFO: - print( - 'Current logging level set to "{}". More information can be found here: ' - 'https://dsmr-reader.readthedocs.io/en/v4/troubleshooting.html#logging'. format( - logging.getLevelName(logging_level) - ) + if logging_level <= logging.INFO: + return + + print( + 'Current logging level set to "{}". More information can be found here: ' + 'https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html'.format( + logging.getLevelName(logging_level) ) + ) class ReadOnlyAdminModel(admin.ModelAdmin):