Add iso timestamp to all events, fix #7043

This commit is contained in:
Thomas S Hatch 2013-09-05 22:41:25 -06:00
parent 50b6ba4c03
commit babaef6bd4

View File

@ -47,13 +47,13 @@ Namspaced tag
'''
# Import python libs
import time
import os
import fnmatch
import glob
import hashlib
import errno
import logging
import datetime
import multiprocessing
from multiprocessing import Process
from collections import MutableMapping
@ -264,7 +264,9 @@ class SaltEvent(object):
if not self.cpush:
self.connect_pull()
tagend = ""
data['__stamp__'] = datetime.datetime.now().isoformat('_')
tagend = ''
if len(tag) <= 20: # old style compatible tag
tag = '{0:|<20}'.format(tag) # pad with pipes '|' to 20 character length
else: # new style longer than 20 chars