Christian Ribeaud ([EMAIL PROTECTED]):
> Hi,
> I am in trouble with the following logformat:
> LOGFORMAT (%S - %j [%d/%M/%Y:%h:%n:%j %j] "%j http://%v%r%q %j" %c %b "%f" "%B" "%u")
> I am working with Apache as webserver and my customized logformat looks as below. I
>already tried
> the parameter APACHELOGFORMAT... without success (I have got a configuration error).
>The problem seems to be the http://. As we manage 2 virtual hosts, I would like to
>trace the host in the
> requested file.
> How to solve this problem? What is wrong?
> APACHELOGFORMAT (%h %l %u %t \"%m http://%{host}i%U%q %H\" %>s %b \"%{Referer}i\"
>\"%{User-Agent}i\" \"%{Cookie}n\")
> I would be very grateful if someone could help me. Have a nice day,
This is a problem in your (Apache) format:
http://%{host}i%U%q
Because, as you've discovered, you need to translate it to something
like this in Analog:
http://%v%r%q
While you can use just %r to capture the request and query (don't need
%q, Analog will figure that out), you can't preceed it with %v. Analog
doesn't know where the virtual host ends and the request starts (in
fact, it will likely look for a '%' symbol to end the virtual, host,
then a literal 'r' and come back with all lines in the file failing).
The only way to make this work on existing files is to include the
virtual host in the request and deal with it in the reports:
LOGFORMAT (%S - %j [%d/%M/%Y:%h:%n:%j] "%j %r %j" %c %b "%f" "%B" "%u")
Then for the future, change your Apache log format to separate the %v
from the request, perhaps something like this:
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\" \"%{Cookie}n\"" custom
--
Jeremy Wadsack
Wadsack-Allen Digital Group
+------------------------------------------------------------------------
| This is the analog-help mailing list. To unsubscribe from this
| mailing list, go to
| http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
| List archives are available at
| http://www.mail-archive.com/analog-help@lists.isite.net/
| http://lists.isite.net/listgate/analog-help/archives/
| http://www.tallylist.com/archives/index.cfm/mlist.7
+------------------------------------------------------------------------