Make sure to strip any newlines off the name.
This commit is contained in:
parent
31c2f11411
commit
9671d2bb8c
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ class LogMech(object):
|
|||
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.write(MSG_FORMAT % dict(now=now, name=name.strip(), count=count, category=category, data=json.dumps(data)))
|
||||
fd.close()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue