Module: check_mk
Branch: master
Commit: 5a5b2e9885ce7b59cfdec4b5662b741c3f960dc2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a5b2e9885ce7b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jun 3 15:52:33 2015 +0200
#2338 FIX Logging internal GUI exceptions to web.log instead of apache error_log
This cleanup moves log entries about exceptions occured while rendering the
GUI pages from the apache error_log to the <tt>var/log/web.log</tt> file.
---
.werks/2338 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/index.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/2338 b/.werks/2338
new file mode 100644
index 0000000..a775de9
--- /dev/null
+++ b/.werks/2338
@@ -0,0 +1,10 @@
+Title: Logging internal GUI exceptions to web.log instead of apache error_log
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i2
+Date: 1433339472
+Class: fix
+
+This cleanup moves log entries about exceptions occured while rendering the
+GUI pages from the apache error_log to the <tt>var/log/web.log</tt> file.
diff --git a/ChangeLog b/ChangeLog
index 5126fe9..d8aa284 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
* 2262 FIX: Fixed deletion of foreign views/dashboards...
* 2335 FIX: Fixed PNP default template for active checks with arguments...
* 2337 FIX: Fixed problem with long hanging pnp graph rendering calls
+ * 2338 FIX: Logging internal GUI exceptions to web.log instead of apache
error_log...
BI:
* 2336 FIX: BI compilation diagnostics are now logged to the generic web.log...
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 01c3905..4375857 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -303,7 +303,7 @@ def handler(req, fields = None, profiling = True):
msg = "%s %s: %s" % (req.uri, _('Internal error'), e)
if type(msg) == unicode:
msg = msg.encode('utf-8')
- apache.log_error(msg, apache.APLOG_ERR) # log in all cases
+ logger(LOG_ERR, msg)
if plain_error:
html.write(_("Internal error") + ": %s\n" %
html.attrencode(e))
elif not fail_silently: