tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EXT-Patel, Rajesh M" <rajesh.m.pa...@boeing.com>
Subject Web App stdout interception
Date Wed, 28 Apr 2004 23:15:56 GMT
In the following(see end of email) context I have "swallowOutput=true" and then I defined a
FileLogger.
I am using log4j in my webapp, we are dumping everything to standard out.  However
I noticed that STDOUT is not being redirected.  I even did a System.out to prove
that, it still goes to the containers' stdout.log file.  

Does anyone know if this works?  I'm also interested in how it works!  The only
way I can think of would be to replace System.out and watch the threads
that come in.  Tomcat know which request thread is "in" the webapp so it
can redirect it to the proper log file.

Anyways, here is my context definition:


	<Context className="org.apache.catalina.core.StandardContext" 
	         cachingAllowed="true" 
	         charsetMapperClass="org.apache.catalina.util.CharsetMapper" 
	         cookies="true" 
	         crossContext="false" 
	         debug="9" 
		 docBase="d:/appsRoot/apps/BestPractices" 
	         mapperClass="org.apache.catalina.core.StandardContextMapper" 
		 path="/apps/BestPractices" 
	         privileged="false" 
	         reloadable="true" 
	         swallowOutput="true" 
	         useNaming="true" 
	         wrapperClass="org.apache.catalina.core.StandardWrapper">

	  <Logger className="org.apache.catalina.logger.FileLogger"
		  prefix="BestPractices_log." 
	          suffix=".txt"
	          timestamp="true"
	          verbosity="9" />
	          

	  <Manager className="org.apache.catalina.session.PersistentManager"
	      debug="0"
	      saveOnRestart="false">
	  </Manager>
	</Context>

---------------------------------------------------------------------
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