Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 44374 invoked from network); 13 Dec 2004 16:33:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Dec 2004 16:33:45 -0000 Received: (qmail 48220 invoked by uid 500); 13 Dec 2004 16:30:40 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 48187 invoked by uid 500); 13 Dec 2004 16:30:40 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 48154 invoked by uid 99); 13 Dec 2004 16:30:39 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from sid.armstrong.com (HELO sid.armstrong.com) (204.74.20.252) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 13 Dec 2004 08:30:29 -0800 Received: from [10.38.20.246] ([10.38.20.246]) by sid.armstrong.com (8.12.8p1/8.12.8) with ESMTP id iBDGT7Tj011897 for ; Mon, 13 Dec 2004 11:29:08 -0500 Message-ID: <41BDC37F.6040305@joedog.org> Date: Mon, 13 Dec 2004 11:29:51 -0500 From: Tim Funk Organization: Human being User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en, es-mx, de, sv MIME-Version: 1.0 To: Tomcat Users List Subject: Re: TC4.1.30: AccessLogValve References: <7DE67373E5116C4BA89E529E2FE30E9E16E85B@de010236.de.ina.com> In-Reply-To: <7DE67373E5116C4BA89E529E2FE30E9E16E85B@de010236.de.ina.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The javadocs should be a little more up to date. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html -Tim Lemke, Michael IZ/HZA-IOR wrote: > Hm, do you have a pointer on how to go about this? Couldn't find > anything obvious in the docs. > > Thanks, > Michael > > >>-----Original Message----- >>From: Tim Funk [mailto:funkman@joedog.org] >>Sent: Monday, December 13, 2004 3:30 PM >>To: Tomcat Users List >>Subject: Re: TC4.1.30: AccessLogValve >> >> >>No can do with the existing logger. >> >>You can instead use a filter to place the value you desire into the >>ServletRequest. Then you can pull the value from the access log via >> >>%{foo}r (Or whatever you call the variable). >> >>-Tim >> >>Lemke, Michael IZ/HZA-IOR wrote: >> >> >>>Perfect, that did the trick. >>> >>>Last question. How does the conditional logging work? I tried it >>>analogous to the Apache docs as %201{Content-Length}i but >> >>that didn't >> >>>work. The comments in the source aren't to helpful. >>> >>>What I want is %{Content-Length}i if status code is 201 else %b >>> >>>Thanks, >>>Michael >>> >>> >>> >>>>-----Original Message----- >>>>From: Tim Funk [mailto:funkman@joedog.org] >>>>Sent: Monday, December 13, 2004 3:04 PM >>>>To: Tomcat Users List >>>>Subject: Re: TC4.1.30: AccessLogValve >>>> >>>> >>>>I would try single quotes: >>>>pattern='%h %l %u %t "%r" %s %b %{Referer}i %{User-Agent}i' >>>> >>>>-Tim >>>> >>>> >>>> >>>>Lemke, Michael IZ/HZA-IOR wrote: >>>> >>>> >>>> >>>>>Thanks, that'll probably do it. But how do I code it in >>>> >>>>the server.xml >>>> >>>> >>>>>file? My first experiments aren't liked by tomcat: >>>>> >>>>>>>>> directory="logs" prefix="AccessLog." suffix="" >>>>> rotatable="true" >>>>> pattern="%h %l %u %t \"%r\" %s %b %{Referer}i >>>>>%{User-Agent}i" resolveHosts="true"/> >>>>> >>>>>How do I get the quotes right? >>>>> --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org