tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lemke, Michael IZ/HZA-IOR" <lemke...@de.ina.com>
Subject RE: TC4.1.30: AccessLogValve
Date Mon, 13 Dec 2004 16:20:55 GMT
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:
> >>>
> >>><Valve className="org.apache.catalina.valves.AccessLogValve"
> >>>                 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?
> >>>
> >>>Thanks again,
> >>>Michael
> >>>
> >>>
> >>>
> >>>>-----Original Message-----
> >>>>From: Tim Funk [mailto:funkman@joedog.org] 
> >>>>Sent: Monday, December 13, 2004 1:15 PM
> >>>>To: Tomcat Users List
> >>>>Subject: Re: TC4.1.30: AccessLogValve
> >>>>
> >>>>
> >>>>%{Content-Length}i
> >>>>
> >>>>-Tim
> >>>>
> >>>>Lemke, Michael IZ/HZA-IOR wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Hi,
> >>>>>
> >>>>>I've got TC 4.1.30 running.  How can make the 
> AccessLogValve report
> >>>>>the bytes *received* for PUT/POST requests?  Or is there 
> >>>>
> >>>>another way to
> >>>>
> >>>>
> >>>>>log
> >>>>>it? 
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message