tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <>
Subject Re: Bootstrap redirecting stdout/err via system.set
Date Wed, 28 Nov 2007 08:29:35 GMT
William L. Thomson Jr. wrote:
> Recently on Gentoo I was looking to improve how we start Tomcat.
> Specifically how we capture stdout/stderr output from Tomcat on start
> and redirect it to catalina.out.

Have to tried to use jsvc from for that?



 Presently due to our use of
> start-stop-daemon and some issues it comes with. We are using the normal
> redirection to capture the output. >> catalina.out 2>&1
> In getting feedback to alternatives to our present approach, like that
> suggested in comment #5 on the following bug[1]. Another inquired as to
> why Tomcat wasn't capturing and redirecting it's own stdout/stderr via
> system properties?
> Like how .home and .base are set now.
> public void setCatalinaHome(String s) {
> 	System.setProperty( "catalina.home", s );
> }
> public void setCatalinaBase(String s) {
> 	System.setProperty( "catalina.base", s );
> }
> Which would alleviate the need to capture and redirect that stuff
> externally of Tomcat. Is there a reason this is not currently done? Has
> this approach been considered before? Something like 
> System.setOut(aPrintStream);
> System.setErr(aPrintStream);
> Where the location would be configurable via a var or etc with a default
> specified.
> Basically others are suggesting I write a wrapper class or etc to
> Bootstrap to set those properties there. I guess we could do that on
> Gentoo. But would like to get upstreams input there. Much less I would
> likely patch Bootstrap before wrapping it.

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

View raw message