Module: check_mk
Branch: master
Commit: 1f519ce4192a43ba3ad16f2b541393416246b5df
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1f519ce4192a43…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Oct 4 07:54:21 2017 +0200
Changed html.log calls to use logger directly
Change-Id: Icd880beff95483f5457a124bc71753aaef71a22c
---
.bugs/2970 | 7 +++++--
web/htdocs/metrics.py | 5 ++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.bugs/2970 b/.bugs/2970
index fa0a97c..1aefb29 100644
--- a/.bugs/2970
+++ b/.bugs/2970
@@ -1,9 +1,12 @@
Title: Manually defined log level for web.log is not used
Component: wato
-State: open
+Class: bug
+State: works4me
Date: 2017-09-22 10:36:07
Targetversion: 1.4.0
-Class: bug
If the log level is set manually in WATO nothing changes in the global.mk. It
seems that the setting is not used at all.
+
+2017-10-04 07:49:37: changed state open -> works4me
+The setting "User Interface > Logging" is stored in
etc/check_mk/multisite.d/wato/global.mk by saving the option log_levels. It works as
expected in 1.4 and master.
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index 208b44f..dec841d 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -411,7 +411,7 @@ def parse_perf_data(perf_data_string, check_command=None):
try:
parts = split_perf_data(perf_data_string)
except ValueError, e:
- html.log("Failed to parse perfdata string: %s" % perf_data_string)
+ logger.exception("Failed to parse perfdata string: %s",
perf_data_string)
return [], check_command
if not parts:
@@ -464,8 +464,7 @@ def parse_perf_data(perf_data_string, check_command=None):
perf_data.append(perf_data_tuple)
except:
- html.log("Failed to parse perfdata '%s': %s" %
- (perf_data_string, traceback.format_exc()))
+ logger.exception("Failed to parse perfdata '%s'",
perf_data_string)
if config.debug:
raise