2
0
Эх сурвалжийг харах

make value of disabled level higher
so that no other log has higher priority

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>

Soumik Dutta 2 жил өмнө
parent
commit
6a2eb1f157

+ 1 - 1
borgmatic/hooks/healthchecks.py

@@ -76,7 +76,7 @@ def initialize_monitor(hook_config, config_filename, monitoring_log_level, dry_r
     we can send them all to Healthchecks upon a finish or failure state. But skip this if the
     we can send them all to Healthchecks upon a finish or failure state. But skip this if the
     "send_logs" option is false.
     "send_logs" option is false.
     '''
     '''
-    if hook_config.get('send_logs') is False or monitoring_log_level == logging.DISABLED:
+    if hook_config.get('send_logs') is False:
         return
         return
 
 
     ping_body_limit = max(
     ping_body_limit = max(

+ 1 - 1
borgmatic/logger.py

@@ -141,7 +141,7 @@ def add_logging_level(level_name, level_number):
 
 
 
 
 ANSWER = logging.WARN - 5
 ANSWER = logging.WARN - 5
-DISABLED = logging.DEBUG - 5
+DISABLED = logging.CRITICAL + 10
 
 
 
 
 def add_custom_log_levels():  # pragma: no cover
 def add_custom_log_levels():  # pragma: no cover