Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: Tomcat access log question

Tim Funk

2007-07-23

Replies:

Extend or copy (and change) the appropriate AccessLogValve. Then place
the (changed or new) files into the server/lib or server/classes
directory as needed. (tomcat 5 speak)

Then add to server.xml (or appropriate) the new access log class.

-Tim

John Hui wrote:
> Does this mean I need to get the source for Tomcat and change the
> org/apache/catalina/valves/AccessLogValve.java. Then build and use my own
> version of Tomcat.
>
> Or is there a way that I somehow create my own
> org/apache/catalina/valves/AccessLogValve.java or class and put it in a
> directory in my Tomcat environment and modify the server.xml to point to my
> customer AccessLogValve.
>
> I'm very new to tomcat so any help or link to how to do this would help a
> lot!
>
> Thanks for taking the time to respond to my question!
>
> John
>
> On 7/21/07, Caldarale, Charles R <Chuck.Caldarale@(protected):
>>
>> > From: John Hui [mailto:john.m.hui@(protected)]
>> > Subject: Re: Tomcat access log question
>> >
>> > I am actually not permitted to store any of these
>> > confidential information any where including ( the
>> > access logs ).
>>
>> Due to the rather specialized nature of your requirements, your best bet
>> may well be to use your own access logger, extending the Tomcat-supplied
>> one. That way you can strip out or mask the confidential information
>> without worrying about who has read access to the logs. Just override
>> the invoke() method of whichever access log valve you're using:
>>   org/apache/catalina/valves/AccessLogValve.java
>>   org/apache/catalina/valves/ExtendedAccessLogValve.java
>>   org/apache/catalina/valves/FastCommonAccessLogValve.java
>>


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.