ENH: Reorder date regex and remove duplicate ISO8601 format

pull/214/head
Steven Hiscocks 2013-06-18 22:19:53 +01:00
parent d5006f36c8
commit 9b8eaa90ef
1 changed files with 2 additions and 4 deletions

View File

@ -59,12 +59,12 @@ class DateDetector:
def addDefaultTemplate(self): def addDefaultTemplate(self):
self.__lock.acquire() self.__lock.acquire()
try: try:
# standard
self.appendTemplate("%b %d %H:%M:%S")
# asctime # asctime
self.appendTemplate("%a %b %d %H:%M:%S %Y") self.appendTemplate("%a %b %d %H:%M:%S %Y")
# asctime without year # asctime without year
self.appendTemplate("%a %b %d %H:%M:%S") self.appendTemplate("%a %b %d %H:%M:%S")
# standard
self.appendTemplate("%b %d %H:%M:%S")
# simple date # simple date
self.appendTemplate("%Y/%m/%d %H:%M:%S") self.appendTemplate("%Y/%m/%d %H:%M:%S")
# simple date too (from x11vnc) # simple date too (from x11vnc)
@ -76,8 +76,6 @@ class DateDetector:
self.appendTemplate("%d/%b/%Y:%H:%M:%S") self.appendTemplate("%d/%b/%Y:%H:%M:%S")
# CPanel 05/20/2008:01:57:39 # CPanel 05/20/2008:01:57:39
self.appendTemplate("%m/%d/%Y:%H:%M:%S") self.appendTemplate("%m/%d/%Y:%H:%M:%S")
# Exim 2006-12-21 06:43:20
self.appendTemplate("%Y-%m-%d %H:%M:%S")
# custom for syslog-ng 2006.12.21 06:43:20 # custom for syslog-ng 2006.12.21 06:43:20
self.appendTemplate("%Y.%m.%d %H:%M:%S") self.appendTemplate("%Y.%m.%d %H:%M:%S")
# named 26-Jul-2007 15:20:52.252 # named 26-Jul-2007 15:20:52.252