Tomcat 4.0 doesn't support the %{xxx}i syntax. You need 4.1.16 or better.

-Tim


Marc X. Schroeder wrote:

Tim,

Many thanks for replying.  A custom pattern is what I figured I needed
to do, but when I tried it in many combinations it errored on certain
tags.

I would ultimately like to get all fields so trying this worked for all
values except the %{}i entries.

pattern='%a %A %b %B %h %H %l %m %p %q "%r" %s %t %u %U %v "%{Referer}i"
"%{User-Agent}i"'

The log file logged everything fine except showed ???{???Referer} and
???{???User-Agent}.  It is like it doesn't recognize { as a proper
property.


But when I actually spell out the 'combined' string like this: pattern='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'

The log file is fine.


So I tried adding in just the %v to the combined tag like this: pattern='%h %l %u %t "%r" %s %b %v "%{Referer}i" "%{User-Agent}i"'

And then the log file showed all % properties ok but gave me the same
errors: ???{???Referer}


It seems that using "%{Referer}i" with any combination other than the 'combined' string will fail to log it properly.

At the very least we need to be able to log %v and %{Referer}.  Is
anyone doing anything similar?



Regards,
Marc S.
Web Content Editor
CSA Travel Protection


-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 5:00 AM
To: Tomcat Users List
Subject: Re: FW: Server.xml/AccessLog question


You should be able to use a custom pattern in 4.0 (or better).

But pattern="combined %v" is incorrect. You need to explictily specify
all the fields. (As in the javadocs or Vavle docs which talks about
accesslogvalve)

-Tim

Marc X. Schroeder wrote:


Hi,

I need to be able to customize my access_log file which is defined in

server.xml. Were using tomcat 4.0.

I have been using
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="c:\logs\tomcat"  prefix="localhost_access_log."

suffix=".txt"

pattern="combined"/>

But I also need to be able to track the %v option as well. When I do this <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="c:\logs\tomcat" prefix="localhost_access_log."

suffix=".txt"

pattern="combined %v"/>

I get this logged
combined dev.csatravelprotection.com
-or with other configurations -
"???{???Referer}i" dev.csatravelprotection.com


I need to be able to log all of the combined properties and the Local

server name to the same log entry. I have tried many combinations with no success. I have also poured over documentation for days before sending this email. Does anyone have any ideas what I'm doing wrong?


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to