ENH: date for apache-2.4 - adds milliseconds

pull/336/head
Daniel Black 2013-08-25 21:11:47 +10:00
parent 62c13c15d6
commit ced271b908
2 changed files with 8 additions and 1 deletions

View File

@ -38,6 +38,7 @@ ver. 0.8.11 (2013/XX/XXX) - loves-unittests
Daniel Black
* filter.d/exim-spam.conf -- a splitout of exim's spam regexes
with additions for greater control over filtering spam.
* add date expression for apache-2.4 - milliseconds
- Enhancements:
Daniel Black
* filter.d/{asterisk,assp,dovecot,proftpd}.conf -- regex hardening

View File

@ -46,7 +46,13 @@ class DateDetector:
def addDefaultTemplate(self):
self.__lock.acquire()
try:
# asctime
# asctime with subsecond
template = DateStrptime()
template.setName("WEEKDAY MONTH Day Hour:Minute:Second[.subsecond] Year")
template.setRegex("\S{3} \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}\.\d+ \d{4}")
template.setPattern("%a %b %d %H:%M:%S.%f %Y")
self._appendTemplate(template)
# asctime without no subsecond
template = DateStrptime()
template.setName("WEEKDAY MONTH Day Hour:Minute:Second Year")
template.setRegex("\S{3} \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2} \d{4}")