I recently moved a tomcat app from tomcat 5 on windows server 2003 to tomcat 6 under windows server 2008. Now there is a delay writing to the log files. This is for both stdout and acceess logs. For example you can go to some page then open the access log but there wont be any record of that access for a few minutes. This is a pain because if there is a problem reported we don't want to have to wait until the log files are written out. I guess tomcat or windows server must be buffering the logs. Is there some way to disable this.
We have not modified the logging.properties file and it does not contain any bufferSize entries.
Buffering isn't enabled in tomcat by default, but it may be on your system.
Open
$CATALINA_BASE/conf/logging.properties
and find lines with this string in thembufferSize
e.g. :4admin.org.apache.juli.FileHandler.bufferSize = 16384
comment the line out or delete it, and your delayed write should go away.