Module: check_mk
Branch: master
Commit: 1c5fc9cc80357dde879e0a59a4f44feb8de71696
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1c5fc9cc80357d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Oct 4 07:56:09 2017 +0200
Removed html.log() call
- logging is not related to html rendering
- method was not aware of log levels
There is now a dedicated "log" module to manage the logging of the GUI.
Use something like this now:
C+:
from log import logger
logger.error(...)
C-:
You can use all the features of the default python logging module
loggers now.
Change-Id: Iaa12a99e4e70b4f4cf7925770d01758d813cdfaa
---
web/htdocs/html_mod_python.py | 7 -------
web/htdocs/htmllib.py | 4 ----
2 files changed, 11 deletions(-)
diff --git a/web/htdocs/html_mod_python.py b/web/htdocs/html_mod_python.py
index 9623666..923f131 100644
--- a/web/htdocs/html_mod_python.py
+++ b/web/htdocs/html_mod_python.py
@@ -229,13 +229,6 @@ class html_mod_python(htmllib.html):
self.javascript('update_header_timer()')
self.top_heading_right()
- def log(self, *args):
- for arg in args:
- if type(arg) in (str, unicode):
- text = arg
- else:
- text = repr(arg)
- logger.warning(text)
def http_redirect(self, url):
self.set_http_header('Location', url)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 721b528..0364e18 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -1735,10 +1735,6 @@ class html(HTMLGenerator, RequestHandler):
self.lowlevel_write("%s" % self.render_pre(formatted))
- def log(self, *args):
- raise NotImplementedError()
-
-
#
# URL building
#