You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Purcell <sp...@vertisinc.com> on 2006/04/12 15:11:33 UTC
Access Log Question
Hello,
When configuring my Tomcat 5.5, I have added a "context" element to my
server.xml for a certain site. Within that tag, I added logging for an
access log.
The access log rolls each day and shows the IP from user and the page,
image, link he is accessing along with a http status code.
So it appears this all works well.
I would like to add the "user-agent" tag to this access log.
Does anyone have an example of how this is done, or a link of how to
accomplish this?
Thanks,
Re: Access Log Question
Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Scott Purcell wrote:
> When configuring my Tomcat 5.5, I have added a "context" element to my
> server.xml for a certain site. Within that tag, I added logging for an
> access log.
>
> The access log rolls each day and shows the IP from user and the page,
> image, link he is accessing along with a http status code.
>
> So it appears this all works well.
>
> I would like to add the "user-agent" tag to this access log.
>
> Does anyone have an example of how this is done, or a link of how to
> accomplish this?
For example by setting pattern="combined" on the AccessLogValve you are using.
You could also fine-tune the pattern to suit your needs:
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
BTW: As of Tomcat 5 it is recommended not to put context configurations into
server.xml but to use the standalon XML files in
$CATALINA_HOME/conf/[enginename]/[hostname]
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
Regards
mks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org