summaryrefslogtreecommitdiffstats
path: root/callback_plugins
diff options
context:
space:
mode:
Diffstat (limited to 'callback_plugins')
-rw-r--r--callback_plugins/logdetail.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/callback_plugins/logdetail.py b/callback_plugins/logdetail.py
index cbf40b735..d4f05b4a5 100644
--- a/callback_plugins/logdetail.py
+++ b/callback_plugins/logdetail.py
@@ -138,7 +138,8 @@ class LogMech(object):
elif self.play_info.get('check', False):
category = 'CHECK:' + category
- fd = open(self.logpath_play + '/' + host + '.log', 'a')
+ sanitize_host = host.replace(' ', '_').replace('>', '-')
+ fd = open(self.logpath_play + '/' + sanitize_host + '.log', 'a')
now = time.strftime(TIME_FORMAT, time.localtime())
fd.write(MSG_FORMAT % dict(now=now, name=name, count=count, category=category, data=json.dumps(data)))
fd.close()