tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Moore" <tmo...@blackboard.com>
Subject RE: System.out logs
Date Fri, 17 Jan 2003 21:58:41 GMT
> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org] 
> Sent: Friday, January 17, 2003 3:46 PM
> To: Tomcat Users List
> Subject: RE: System.out logs
> 
> 
> 
> 
> On Fri, 17 Jan 2003, Tim Moore wrote:
> 
> > Date: Fri, 17 Jan 2003 13:34:50 -0500
> > From: Tim Moore <tmoore@blackboard.com>
> > Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > Subject: RE: System.out logs
> >
> > > -----Original Message-----
> > > From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
> > > Sent: Friday, January 17, 2003 1:30 PM
> > > To: Tomcat Users List
> > > Subject: RE: System.out logs
> > >
> > >
> > > Howdy,
> > >
> > > >I know we could pipe the output to a file but there should
> > > be something
> > > >better. Like calling System.setout() or perhapsa  Logger tag...??
> > >
> > > Those things are available in tomcat 4.x.  Upgrade to get 
> them ;)  
> > > For 3.x, you're stuck with OS-dependent, non-portable 
> solutions to 
> > > this requirement. ;(
> > >
> >
> > System.setOut is obviously part of the JDK and not Tomcat 
> 4. Using a 
> > logger tag won't affect standard output.
> >
> > Tomcat 4 uses plain old shell redirection to log standard out to a 
> > file. If you think using Sysstem.setOut is a better 
> solution, then go 
> > right ahead, but personally I feel that using shell redirection is 
> > both simpler, and more maintainable.
> 
> Actually, in recent 4.1 releases, this has changed :-).  
> Tomcat can intercept System.out and System.err, and redirects 
> them to whatever <Logger> you have set for your context, if 
> you say swallowOutput="true" in your <Context> element.

Ah, well that's handy! Learn something new every day! :-)

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863

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


Mime
View raw message