tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilson, Chip" <Chip.Wil...@archongroup.com>
Subject RE: SwallowOutput with JavaService
Date Fri, 02 May 2003 16:03:40 GMT
I figured this out.  It turns out that the BootstrapService class that you are supposed to
invoke from JavaService (instead of Bootstrap) uses CatalinaService (instead of Catalina),
which inherits from Catalina but overrides the start method, which is where stdout is hooked.
 Since CatalinaService doesn't hook stdout, swallowOutput is broken when running as a service.

By changing the JavaService registration to invoke Bootstrap instead of BootstrapService,
swallowOutput works.

Why do BootstrapService and CatalinaService exist? (yes, I've looked at the code).  What problems
might I run into using Bootstrap from JavaService instead of BootstrapService?

Thanks in advance.

--Chip

-----Original Message-----
From: Wilson, Chip 
Sent: Thursday, May 01, 2003 4:17 PM
To: tomcat-user@jakarta.apache.org
Subject: SwallowOutput with JavaService


Hi all,

We have a number of apps deployed in a Tomcat 4.1.24 environment on Win2K.  They are deployed
using XML context configuration files like this one: 


<Context path="/bts/Disposition" docBase="../bts/disposition.war"
        debug="0" crossContext="true" 
		swallowOutput="true">

    <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_Disposition_log." suffix=".txt"
          timestamp="false"/>

</Context>

When we run Tomcat from a command prompt, our messages to system.out are correctly swallowed
and sent to the log file specified.  However, when we deploy Tomcat as a Windows NT service
using JavaService (tomcat.exe), our messages to System.out are no longer swallowed and sent
to the log file.  We have tried various configurations of JavaService, including with and
without a stdout file of it's own, various settings for current working directory, etc.  Nothing
seems to correct the problem.

Does anyone have any clue how to remedy this situation short of rewriting all of our logging
to not use system.out?  We really need to run Tomcat as a service, and we really need our
system.out messages to be captured.

Thanks in advance.

--Chip

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message