mirror of https://github.com/fail2ban/fail2ban
- Added new date format (Apache). Thanks to Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@439 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
1f5556981a
commit
a49cc6bb08
|
@ -61,6 +61,12 @@ class DateDetector:
|
||||||
template.setRegex("\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}")
|
template.setRegex("\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}")
|
||||||
template.setPattern("%Y/%m/%d %H:%M:%S")
|
template.setPattern("%Y/%m/%d %H:%M:%S")
|
||||||
self.__templates.append(template)
|
self.__templates.append(template)
|
||||||
|
# Apache format [31/Oct/2006:09:22:55 -0000]
|
||||||
|
template = DateStrptime()
|
||||||
|
template.setName("Day/Month/Year:Hour:Minute:Second")
|
||||||
|
template.setRegex("\d{2}/\S{3}/\d{4}:\d{2}:\d{2}:\d{2}")
|
||||||
|
template.setPattern("%d/%b/%Y:%H:%M:%S")
|
||||||
|
self.__templates.append(template)
|
||||||
# TAI64N
|
# TAI64N
|
||||||
template = DateTai64n()
|
template = DateTai64n()
|
||||||
template.setName("TAI64N")
|
template.setName("TAI64N")
|
||||||
|
|
Loading…
Reference in New Issue