ApacheLogRegex
Inherits Reference < Object
Constructors
Instance methods
The normalized log file format. Some common formats:
Common Log Format (CLF) '%h %l %u %t "%r" %>s %b'
Common Log Format with Virtual Host '%v %h %l %u %t "%r" %>s %b'
NCSA extended/combined log format '%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"'
Parses <tt>line</tt> according to current log <tt>format</tt> and returns an hash of log field => value on success. Returns <tt>nil</tt> if <tt>line</tt> doesn't match current log <tt>format</tt>.
Same as <tt>ApacheLogRegex#parse</tt> but raises a <tt>ParseError</tt> if <tt>line</tt> doesn't match current <tt>format</tt>.
==== Raises
ParseError:: if <tt>line</tt> doesn't match current <tt>format</tt>
Overwrite this method if you want to use some human-readable name for log fields. This method is called only once at <tt>parse_format</tt> time.