in reply to Re: Apache::ParseLog
in thread Apache::ParseLog

And you use this in production? Ouch.

I have some code that isn't all that complex. It takes an access log and parses it and drops it into a heavily normalized database. From there you can run all sorts of queries against it.

The hardest part is parsing the access log string; I haven't seen any good perl code ever (even the stuff I wrote :)) that does a perfect job. You're always going to miss some records -- especially because people do things like 'get /"' for some weird reason and throw off the quoting context.

One option I haven't played with yet is using a funky delimiter between every entry, like |&| or something that should never occur in nature. This breaks a bunch of propietary software we use, so it isn't really an option here.

My experience with Apache::ParseLog is that it does far too much. You should be able to feed it a format string and a filehandle -- how often do you parse your logs while they are sitting on a web server?

out.