I'm running Tomcat 6 under Windows, using the bundled Windows service runner. I seem to have the following behavior:
- If one of my webapps writes to stdout (via, say, System.out.println), then this output shows up verbatim in logs titled like stdout_xxx.log.
- If the jvm itself writes to stdout (as it does if you enable -XX:+PrintCompilation), then this output shows up in logs titled like jakarta_service_xxx.log.
Also, jakarta_service_xxx.log is not a direct dump of stdout; rather, something seems to be intercepting stdout and redirecting that through java logging. Thus whereas the JVM, running free of Tomcat, would normally print
283 s java.lang.StringBuffer::length (5 bytes)
what shows up in jakarta_service_xxx.log is this:
[2010-01-15 17:07:15] [info] 283
[2010-01-15 17:07:15] [info] s
[2010-01-15 17:07:15] [info] java.lang.StringBuffer::
[2010-01-15 17:07:15] [info] l
[2010-01-15 17:07:15] [info] e
[2010-01-15 17:07:15] [info] n
[2010-01-15 17:07:15] [info] g
[2010-01-15 17:07:15] [info] t
[2010-01-15 17:07:15] [info] h
[2010-01-15 17:07:15] [info] (5 bytes)
Can you clarify why stdout would be getting treated differently in the two cases? Alternatively, any hints on how to get the JVM output from -XX:+PrintCompilation to show up in stdout.log, instead of as the above craziness?