nOn Mon, 4 Aug 2003, Jeremy Stanton wrote:

> I am trying to configure analog to read logs with entries in the following
> format:
>
> 156.26.3.70 - - [30/Jun/2003:21:36:48 -0400] "GET
> /mydir/mysubdir/index.html HTTP/1.1" 200 103398 Mozilla/4.0 (compatible;
> MSIE 6.0; Windows NT 5.1) http://www.referringurl.com/somedir/index.html
>
> The problem is, neither the user agent or referer URL are encapsulated
> with quotes, commas, brackets, etc, so analog is parsing them incorrectly
> (I get User-Agent pieces in my referer). And I don't have access to the
> apache server to change the log format unfortunately.
>
> I currently am using:
>
> APACHELOGFORMAT (%h %l %u %t \"%r\" %>s %b %{User-agent}i %{Referer}i)
>

There is no way for analog to process these because it can't tell where the
browser ends and the referrer begins (and there is no way to tell without
looking ahead to the end of the line and then going backwards). Your only
solution is to preprocess your logs to add the missing quotes.

-- 
Stephen Turner, Cambridge, UK    http://homepage.ntlworld.com/adelie/stephen/
 "The question of whether a computer can think is no more interesting than
  the question of whether a submarine can swim."  (Edsger W. Dijkstra)

+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
|  Digest version: http://lists.isite.net/listgate/analog-help-digest/
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
+------------------------------------------------------------------------

Reply via email to