This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Description
Hi,
I have this apache pattern for date : %{%FT%T%z}t
Sample log date : 2017-09-20T00:06:16+0200
**Code **
_format = "%{%FT%T%z}t"
line_parser = apache_log_parser.make_parser(_format)
log_line_data = line_parser('2017-09-20T00:06:16+0200')
pprint(log_line_data)
**Error **
Traceback (most recent call last):
line_parser = apache_log_parser.make_parser(format)
File "...\site-packages\apache_log_parser_init.py", line 236, in make_parser
return Parser(format_string).parse
File "...\site-packages\apache_log_parser_init_.py", line 219, in init
self.log_line_regex = re.compile(self.log_line_regex)
File "...\conda\anaconda2\lib\re.py", line 194, in compile
return _compile(pattern, flags)
File "...\conda\anaconda2\lib\re.py", line 251, in compile
raise error, v # invalid expression
sre_constants.error: bad character in group name 'time%ft%t%z'
Doumentation
The time, in the form given by format, which should be in strftime(3) format. (potentially localized)
Have you any idea ?
Regards