Excuse me for following up on myself. Now that I got it working
I am wondering why Tomcat does it the way it does. All I changed
boils down to this change in AccessLogInterceptor:
Index: AccessLogInterceptor.java
===================================================================
RCS file:
/inaetc/bfsaparc/cvs/repos/jakarta-tomcat-src/src/share/org/apache/tomcat/modules/loggers/AccessLogInterceptor.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 AccessLogInterceptor.java
--- AccessLogInterceptor.java 26 Mar 2002 15:36:51 -0000 1.1.1.1
+++ AccessLogInterceptor.java 1 Oct 2003 16:00:12 -0000
@@ -185,7 +185,7 @@
/** <p>This method is actually creating an entry in the log file.</p>
*/
- public int beforeCommit(Request request, Response response) {
+ public int postRequest(Request request, Response response) {
synchronized (AccessLogInterceptor.class) {
FileWriter fw = getFileWriter();
if (fw != null) {
Shouldn't that be put into the current release of TC3.3?
(My actual solution made this into a new class so I had to change more.)
Thanks,
Michael
> -----Original Message-----
> From: Lemke, Michael IZ/HZA-IE5
> Sent: Wednesday, October 01, 2003 10:08 AM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log
> PUT requests
>
>
> Almost. TOMCAT_HOME/lib/container did the trick.
>
> Thanks again,
> Michael
>
>
> > -----Original Message-----
> > From: Larry Isaacs
> > Sent: Tuesday, September 30, 2003 9:23 PM
> > To: Tomcat Users List
> > Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log
> > PUT requests
> >
> >
> > To deploy the class file, I believe you can create a
> > "classes" directory under TOMCAT_HOME/lib/server and put
> > your class in a package appropriate directory under there.
> > With your modifications to the modules.xml and server.xml,
> > it should work.
> >
> > Larry
> >
> > > -----Original Message-----
> > > From: Lemke, Michael IZ/HZA-IE5 [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, September 30, 2003 11:35 AM
> > > To: 'Tomcat Users List'
> > > Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log
> > > PUT requests
> > >
> > >
> > > Thanks, Larry. Not knowing any Java I managed to write (or
> > > rather copy) something for postRequest. Seems to work fine.
> > > Now my question is, is it possible to compile that module so
> > > I get a single .class file that I can copy somewhere in the
> > > official binary tree? What works for me is have the .java in
> > > share/org/apache/tomcat/modules/loggers, add org... to
> > > modules.xml and server.xml and have ant make new jar files.
> > > I couldn't find anything in the docs in that regard that I
> > > could understand.
> > >
> > > Thanks,
> > > Michael
> > >
> > > > -----Original Message-----
> > > > From: Larry Isaacs
> > > > Sent: Monday, September 29, 2003 7:32 PM
> > > > To: Tomcat Users List
> > > > Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log
> > > > PUT requests
> > > >
> > > >
> > > > You could implement your own interceptor and use one of the
> > > hooks more
> > > > suitable than beforeCommit(), perhaps postReadRequest(),
> > > contextMap(),
> > > > or postRequest().
> > > >
> > > > I don't know if there is an existing interceptor that with
> > > the right
> > > > debug level would give you want you want without giving you
> > > too much
> > > > log output.
> > > >
> > > > Larry
> > > >
> > > > > -----Original Message-----
> > > > > From: Lemke, Michael IZ/HZA-IE5
> > > > > Sent: Monday, September 29, 2003 6:40 AM
> > > > > To: 'Tomcat Users List'
> > > > > Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log
> > > > > PUT requests
> > > > >
> > > > >
> > > > > A long time ago I sent the attached message. There was no
> > > > > solution to the problem. It has just come up again and I am
> > > > > wondering what
> > > > > options there are to get *everything* logged. Would a
> > > > > combination with Apache solve this? We need to somehow be
> > > > > able to proove that we have or have not received a
> > > certain request.
> > > > >
> > > > > Thanks,
> > > > > Michael
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Larry Isaacs
> > > > > > Sent: Tuesday, July 02, 2002 2:10 PM
> > > > > > To: 'Tomcat Users List'
> > > > > > Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log
> > > > > > PUT requests
> > > > > >
> > > > > >
> > > > > > AcessLogInterceptor writes the log entry using the
> > > > > > beforeCommit() hook. If no response is generated by
> > > > > > the request, then it appears that no log entry would
> > be created.
> > > > > >
> > > > > > Cheers,
> > > > > > Larry
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Lemke, Michael IZ/HZA-IC1
> > > > > > > Sent: Tuesday, July 02, 2002 4:10 AM
> > > > > > > To: 'Tomcat Users List'
> > > > > > > Subject: Tomcat 3.3.1: AccessLogInterceptor doesn't log
> > > > > PUT requests
> > > > > > >
> > > > > > >
> > > > > > > We are running Tomcat 3.3.1 in standalone mode (no
> > > Apache etc)
> > > > > > > and log requestes to AccessLog with
> > > AccessLogInterceptor. Unless
> > > > > > > we misconfigured something it seems like PUT requests
> > > only show
> > > > > > > up in the log if they produced an error (404, 500).
> > > Is this a
> > > > > > > configuration problem or is there something wrong with
> > > > > > > AccessLogInterceptor?
> > > > > > >
> > > > > > > Thnaks,
> > > > > > > Michael
> > > > > > >
> > > > > > > --
> > > > > > > To unsubscribe, e-mail:
> > > > > > > <mailto:tomcat-user-> [EMAIL PROTECTED]> For
> > > > > > > additional commands,
> > > > > > > e-mail: <mailto:[EMAIL PROTECTED]>
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > To unsubscribe, e-mail:
> > > > > > <mailto:tomcat-user-> [EMAIL PROTECTED]>
> > > > > > For
> > > > > > additional commands,
> > > > > > e-mail: <mailto:[EMAIL PROTECTED]>
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]