@cryptotaxi247 / netdata-1 / commits / e971db7a3

Change error log for time_multiplier

Ali Borhani committed Jul 25, 2018 at 11:22 UTC e971db7a39e111808110f6f32796d7f3ee15ad44
1 file changed +2 -2
python.d/web_log.chart.py
+2 -2
@@ -602,7 +602,7 @@ class Web:
602 We are here only if "custom_log_format" is in logs. We need to make sure:
603 1. "custom_log_format" is a dict
604 2. "pattern" in "custom_log_format" and pattern is <str> instance
605 - 3. if "time_multiplier" is in "custom_log_format" it must be <int> instance
605 + 3. if "time_multiplier" is in "custom_log_format" it must be <int> or <float> instance
606
607 If all parameters is ok we need to make sure:
608 1. Pattern search is success
@@ -630,7 +630,7 @@ class Web:
630 resp_time_func = self.configuration.get('custom_log_format', dict()).get('time_multiplier') or 0
631
632 if not isinstance(resp_time_func, (int, float)):
633 - return find_regex_return(msg='Custom log: "time_multiplier" is not an integer')
633 + return find_regex_return(msg='Custom log: "time_multiplier" is not an integer or a float')
634
635 try:
636 regex = re.compile(pattern)