mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-08-31 15:03:44 +00:00
ENH: date for apache-2.4 - adds milliseconds
This commit is contained in:
parent
62c13c15d6
commit
ced271b908
2 changed files with 8 additions and 1 deletions
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue