Module: check_mk
Branch: master
Commit: d97e70567a81718b8cf84ec13754146854fd6d63
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d97e70567a8171…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 29 14:37:09 2016 +0100
Improved WATO activating audit logging a bit
---
web/htdocs/watolib.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 79eea4d..4677b47 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4200,12 +4200,13 @@ class ActivateChangesManager(ActivateChanges):
def _start_activation(self):
+ self._log_activation()
for site_id in self._sites:
self._start_site_activation(site_id)
def _start_site_activation(self, site_id):
- self._log_activation(site_id)
+ self._log_site_activation(site_id)
# This is doing the first fork and the ActivateChangesSite() is doing the second
# (to avoid zombie processes when sync processes exit)
@@ -4220,12 +4221,16 @@ class ActivateChangesManager(ActivateChanges):
os._exit(0)
- def _log_activation(self, site_id):
- log_msg = _("Started activation of site %s") % site_id
+ def _log_activation(self):
+ log_msg = _("Starting activation (Sites: %s)") %
",".join(self._sites)
+ log_audit(None, "activate-changes", log_msg)
+
if self._comment:
- log_msg += " (%s: %s)" % (_("Comment"), self._comment)
+ log_audit(None, "activate-changes", "%s: %s" %
(_("Comment"), self._comment))
- log_audit(None, "activate-changes", log_msg)
+
+ def _log_site_activation(self, site_id):
+ log_audit(None, "activate-changes", _("Started activation of site
%s") % site_id)
def get_state(self):