Re: 1and1 logfile format

"Dave Sergeant" <[email protected]> Mon, 02 Nov 2009 16:23:05 -0000
Newsgroups gmane.comp.web.analog.general
Message-ID <[email protected]>
Don't use LOGFORMAT, rather APACHELOGFORMAT

APACHELOGFORMAT (%h %l %u %t \"%r\" %s %b %{Host}i \"%{Referer}i\" 
\"%{User-agent}i\" "%j")

works just fine with 1&1 here, with the line as the first one in the 
CFG file. (remove the CR so it is all on one line).

Dave

On 2 Nov 2009 at 15:16, Iain Hunneybell wrote:

> Has anyone any experience of processing 1and1 logfiles through analog?
> They seem to use an unusual format that analog doesn't recognise. The
> record layout seems to be:
> 
> Requestor IP
> Username
> Date/time
> "GET requested URL inc HTTP version"
> HTTP response
> Bytes
> Domain to which the request refers <-- This seems to be something
> particular to 1and1 and is unquoted "Referrer" "User agent" "-" <-- No
> idea what this is meant to be!
> 
> So for example:
> 
> 124.115.0.145 - - [07/Sep/2009:00:24:08 +0200] "GET / HTTP/1.1" 200
> 17616 www.mydomain.com "http://www.mydomain.com/" "Mozilla/4.0
> (compatible; MSIE 6.0; Windows NT 5.1)" "-"
> 
> I'm presuming a LOGFORMAT would fix it but no luck. I tried:
> 
> LOGFORMAT (%s - %u [%d/%M/%Y:%h:%n:%j %j] "%j %r %j" %c %b %j %f %B %j)
> 
> Which when matched up with the log record wold read as:
> 
> %s 				- Requestor IP
> -				
> %u 				- Username
> [%d/%M/%Y:%h:%n:%j %j] 	- Date/time
> %j				- GET 
> %r				- requested URL 
> %j				- HTTP version
> %c				- HTTP response
> %b				- Bytes
> %j				- Domain to which the request refers 
> %f				- Referrer
> %B				- Browser/user agent
> %j				- "-" 
> 
> Strangely, despite the LOGFORMAT command <errors.txt> reports:
> 
> analog: Warning F: Can't auto-detect format of logfile
>   Logs\20090907.log: ignoring it
> 
> Any ideas?
> 
> Many thanks.../Iain
> 


http://www.davesergeant.com

+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.meer.net/mailman/listinfo/analog-help
|
|  Analog Documentation: http://analog.cx/docs/Readme.html
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
+------------------------------------------------------------------------