tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Where does my stderr go?
Date Mon, 20 Dec 2010 20:29:56 GMT
Hash: SHA1


On 12/20/2010 3:40 AM, Thomas Kloeber wrote:
> Hi Chris,
> Christopher Schultz wrote on 17.12.2010 18:55:
>> I can see an stderr file in there. Were you expecting anything to be in
>> it immediately after startup? Silly question: how are you writing to stderr?
> yes, I put some output in one of my servlets, just to test this.
> I'm using System.stderr and System.stdout.

No wonder it's not working: System.stdout and System.stderr don't exist
as far as I know. Did you mean System.err and System.out? Precision
counts, especially when things aren't working the way you expect them to be.

>> I was thinking of your conf/ file as well as your
>> configuration for tomcat6w.exe. Describing the log config from
>> tomcat6w.exe (as you have done) and posting should be
>> enough.
> see attachment

:( Attachments are often stripped from posts to the list. Try just
copy-and-pasting inline.

> Logging set up from tomcat6w:
>     * Level: Info
>     * Log path: <apache install dir>\logs
>     * Log prefix: jakarta_service_
>     * Redirect Stdout: auto
>     * Redirect Stderr: auto

Someone more familiar with win32 will have to comment on what those
settings are expected to produce. Note that the "Log*" parameters have
nothing to do with stdout/stderr: they are for reporting (whatever) to
the Windows System Log.

The documentation I can find for the --StdOutput and --StdError
command-line parameters seem to indicate that they describe a filename.
I would expect "auto" to be the filename. If you haven't specified the
path, you will have to check the working directory of the service to
determine where that file will try to be written.

I'm not sure if Tomcat's service wrapper will fail silently or angrily
if files cannot be created. If I were you, I'd specify an exact
filename, including full path, for the "Redirect Stdout" and "Redirect
Stderr" settings, and make sure that the effective user running the
Tomcat service (TOMCAT? LOCAL_SERVICE?) has rights to write to that

>> There is a "swallowOutput" attribute on the <Context> element (found in
>> conf/server.xml if you are a bad boy, or in your webapp's
>> META-INF/context.xml, or in conf/[service]/[host]/[webapp].xml. If set
>> to "true" (it defaults to "false"), then your stdout and stderr will be
>> redirected to the application's log file which is configured in
>> conf/
> this attribute is not set anywhere.

Good to know.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message