tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Anderson" <>
Subject Re: LogSetter in <Context>
Date Fri, 23 Jan 2004 16:51:37 GMT
This probably is an issue with the JVM on NetWare.  Unfortunately,
because of the underlying filesystem, when a flush is called in Java,
all the JVM can do is schedule a flush with the filesystem.  This sounds
like the behavior you are seeing where you have to wait several minutes
to see anything in the filesystem.  The only way I've been able to see a
complete log is to either log it to the logger screen (which is special
in it's own right because of all of the other stuff that is intermingled
in) or perform the behavior that causes the error and then shutdown
tomcat which forces the logs to be flushed and closed.

Mike Anderson

>>> 1/22/2004 11:38:13 PM >>>
Ok, I don't have access to NetWare, but trying your example on Windows
fine.  The logs are flushed as soon as the error occurs.  The only
change I
made was to log as well in ClassNotFoundException (so I don't actually
to set up a database :).

This suggests that the problem is really either with you DB vendor
(unlikely, but I can't rule out that the Driver isn't doing something
:), or with your JVM vendor (e.g. Writer.flush isn't really doing what
it is
supposed to do).

Also I was testing with the CVS HEAD (aka 3.3.2-dev nightly).  The CVS
don't show any real changes in the logging code from this and
however.  If you are feeling frustrated enough, you could try
the nightly and see if there is any difference :).

"Howard Watson" <> wrote in message
See Attachement

>>> 01/15/04 11:34PM >>>
If you could strip-down your web-app to a minimal version that
this problem, and post it to BugZilla (or even here, if you don't mind
p**sing off everyone on the list with a big download :), I'd really
like to
take a look at it.  With a quick eyeballing, I can't see anything in
code that would produce what you describe.

"Howard Watson" <> wrote in message
> Thanks for the reply:
> I'm using Tomcat3.3.1a for Netware. Took a look at what you talked
> about and had the same problems. But, I did learn a little more
> the problem. Apparently, I was hacking the context file, deleting
> files and restarting Tomcat before results were being written.
> The problem is not a failure to write to the log, but that it is
> about 5 minutes after restarting Tomcat before it will write to the
> Then I have exit out of the browser, start a new browser session and
> recreate the error. It then writes everything for that 5 minutes and
> to the most recent error.
> Later, if I generate an error in a new browser session it will write
> that one error, but if I generate multiple errors in a browser
> (the same error) I have to start a new browser session, recreate the
> error and then it writes all the missing errors including the most
> current one.
> Howard
> >>> 01/14/04 11:31PM >>>
> Using the CVS HEAD (aka 3.3.2-dev), I have no problems with the
> default
> setup (which defines a <LogSetter> in the 'examples' Context).
> "Howard Watson" <> wrote in message
> > Does any know of good document or a tutorial for using LogSetter
> within
> > a Tomcat3.3 <Context>? The log file is created but nothing is
> to
> > it.
> >
> > I've searched the list and the Internet and find nothing explicit
> about
> > using name= or servletLogger= in <Context><LogSetter /></Context>.
> >
> > If I don't use LogSetter within the <Context>; servlet:inits are
> > written and getServletContext().log("Test ServertLog:  ", eSQL);
> writes
> > an error to the <ContextManager> servlet_log correctly.
> >
> > Any ideas?
> To unsubscribe, e-mail: 
> For additional commands, e-mail:

To unsubscribe, e-mail: 
For additional commands, e-mail: 


> To unsubscribe, e-mail: 
> For additional commands, e-mail:

To unsubscribe, e-mail: 
For additional commands, e-mail: 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message