kassner / log-parser

PHP Web Server Log Parser Library
Apache License 2.0
339 stars 64 forks source link

updates to apache-log-parser - hostnames, IPv6, empty headers #6

Closed MrSecure closed 11 years ago

MrSecure commented 11 years ago

I've made some changes to make this more useful to me, and hopefully others. Also, I've tried to include @mipaaa's fixes.

Highlights: %h : (updated) handle hostname and IPv6 as well as IPv4 (per apache docs) (fixes #1) %b : (added) responseBytes are different than sentBytes (includes headers) %{HEADER}i : (updated) - permit blank referrers and agents (fixes #5)

Added getPCRE() function to extract the compiled PCRE for review. Updated parse() to include the UNIX Epoch timestamp as 'stamp' when a time is parsed.

Cheers!