tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: System.out logs
Date Fri, 17 Jan 2003 20:45:58 GMT


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.

>
> --
> Tim Moore / Blackboard Inc. / Software Engineer

Craig



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