Bug 48614 - Tomcat does not display logs
Summary: Tomcat does not display logs
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.24
Hardware: HP All
: P2 minor (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-26 00:38 UTC by oscar
Modified: 2010-02-10 23:07 UTC (History)
1 user (show)



Attachments
logging.properties (3.39 KB, application/octet-stream)
2010-01-26 03:53 UTC, oscar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oscar 2010-01-26 00:38:30 UTC
Hi, 

Logs are not flushed at startup. 

When I stop service I can see the whole stack (startup and shutdown) but I cannot see any message at catalina.out while service is running.

I'm using the default server.xml.

Thanks in advance!
Comment 1 oscar 2010-01-26 00:44:18 UTC
More info:

* Note that I have tested tomcat 6.0.20 and logs were displayed successfuly
* Note that we are using tomcat 6.0.24 64bits on windows 2008 x64

Thanks a lot!

> Hi, 
> Logs are not flushed at startup. 
> When I stop service I can see the whole stack (startup and shutdown) but I
> cannot see any message at catalina.out while service is running.
> I'm using the default server.xml.
> Thanks in advance!
Comment 2 Mark Thomas 2010-01-26 03:30:53 UTC
This is an unwanted side-effect of adding support for encoding to JULI. Buffering was also made configurable but there is some unexpected buffering going on in the classes that do the encoding. You can revert to the original behaviour by setting bufferSize=-1 for your log handlers.

Looks like either the default bufferSize needs changing or we need to find a way to avoid the buffering in encoding.
Comment 3 oscar 2010-01-26 03:37:45 UTC
Hi, 

I have been trying to find where can I change the BufferSize and there is no configuration file containing:

bufferSize

If it is not possible to change it I will have to revert to 6.0.20 where flush worked perfectly.

Where can I change this property ?

Thanks a lot!!
Comment 4 oscar 2010-01-26 03:39:14 UTC
I will change priority due to a lack of logs is blocking to set this server in production environment.

Thanks in advance...
Comment 5 Mark Thomas 2010-01-26 03:44:31 UTC
bufferSize is explained in the logging documentation:
http://tomcat.apache.org/tomcat-6.0-doc/logging.html

For example:
1catalina.org.apache.juli.FileHandler.bufferSize=-1
Comment 6 oscar 2010-01-26 03:53:47 UTC
Created attachment 24888 [details]
logging.properties
Comment 7 oscar 2010-01-26 03:54:41 UTC
Hi, 

This workarround has worked perfectly. I have attached my logging.properties in order to help anybody experiencing the same issue.

Thanks a lot.
Comment 8 Mark Thomas 2010-01-31 16:29:48 UTC
This has been fixed in trunk and proposed for 6.0.x by Filip
Comment 9 Mark Thomas 2010-02-10 23:07:12 UTC
The fix has been applied to 6.0.x and will be included in 6.0.25 onwards.