http://qs321.pair.com?node_id=1131037


in reply to Re^8: Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)
in thread Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)

"...3 space-separated components (hint: it doesn't)"

I used this: <LogFormat "%h %l %u %t \"%r\" %>s %b" common>, as in the example by kcott.

From the docs:

"First, the method used by the client is GET. Second, the client requested the resource /apache_pb.gif, and third, the client used the protocol HTTP/1.0."

Hence the request field will always look like this: "GET /karls.beer HTTP/1.0".

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

  • Comment on Re^9: Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)
  • Select or Download Code

Replies are listed 'Best First'.
Re^10: Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)
by wrog (Friar) on Jun 18, 2015 at 22:00 UTC
    (yay, somebody is finally quoting the right spec)

    Key sentence you apparently skipped over

    The log file entries produced in CLF will look something like this
    emphasis mine. In other words, this was an example. Not all commands are GETs, and even for the ones that are, you'll still have assholes out there who are not following the protocol (keeping in mind that the whole freaking point of a log file is to preserve what's actually happening so that you can, say, diagnose stuff that's going wrong...)