Apache2Piwik icon indicating copy to clipboard operation
Apache2Piwik copied to clipboard

Have a way to ignore some paramaters in LOG_FORMAT

Open arthurzenika opened this issue 12 years ago • 0 comments

I have some logs that have the following format :

LOG_FORMAT = "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" "%{Accept}i" "%{Accept-Encoding}i" "%{Accept-Language}i" "

I get a traceback ::

Traceback (most recent call last): File "apache2piwik.py", line 88, in regexpr = re.compile(p.create_regexpr(s.LOG_FORMAT)) File "/usr/lib/python2.6/re.py", line 190, in compile return _compile(pattern, flags) File "/usr/lib/python2.6/re.py", line 241, in _compile raise TypeError, "first argument must be string or compiled pattern" TypeError: first argument must be string or compiled pattern

It would be nice to take into account all possibilities from https://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats or have a way to say "this part you can ignore".

arthurzenika avatar Mar 01 '12 11:03 arthurzenika