You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Laurent Michenaud <lm...@adeuza.fr> on 2003/09/25 09:56:01 UTC

RE : RE : Redirecting the output to a log file

Maybe with debug="0"

Anyway, u should use log4j instead of System.out

-----Message d'origine-----
De : Sarika N Inamdar [mailto:sinamdar@cisco.com] 
Envoyé : mercredi 24 septembre 2003 06:41
À : 'Tomcat Users List'
Objet : RE: RE : Redirecting the output to a log file

Hi,

Thanks for the solution. This works. Now my Servlets System.out is
re-directed to log file.

But I also see that tomcat logs lot of debug statements in the same
debug. This would un-necessarily clutter our application log file.

Is there a way we can filter tomcat System.out messages and log only our
application System.out debug stmts ?

Thanks for the help,
Sarika
 

> -----Original Message-----
> From: Laurent Michenaud [mailto:lmichenaud@adeuza.fr] 
> Sent: Wednesday, September 17, 2003 4:13 PM
> To: Tomcat Users List; sinamdar@cisco.com
> Subject: RE : Redirecting the output to a log file
> 
> 
> Add a logger to your context and the following attribute :
> 
> swallowOutput="true"
> 
> Your system.out will be redirected to the logger you defined 
> for your context.
> 
> Example :
> 
> <Context path="" docBase="/home/adeuza" debug="0"
>                  reloadable="true" crossContext="true" 
> swallowOutput="true">
>                  
> 	<Logger className="org.apache.catalina.logger.FileLogger"
>          directory="/u/logs/" prefix="logfile." suffix=".log"
>          timestamp="true"/>
> </Context>
> 
> -----Message d'origine-----
> De : Sarika N Inamdar [mailto:sinamdar@cisco.com] 
> Envoyé : mercredi 17 septembre 2003 12:40
> À : 'Johan Louwers'; 'Tomcat Users List'
> Objet : RE: Redirecting the output to a log file
> 
> Hi,
> 
> But the servlet System.out code used to log messages to our 
> application log when using tomcat 3.
> 
> With migration to 4.1.24, we are facing this issue.
> 
> Thanks,
> Sarika
> 
> > -----Original Message-----
> > From: Johan Louwers [mailto:Suntac@dds.nl]
> > Sent: Wednesday, September 17, 2003 3:59 PM
> > To: Tomcat Users List; sinamdar@cisco.com
> > Subject: Re: Redirecting the output to a log file
> > 
> > 
> > do not use System.out simply make a write to a file routine
> > and write to a file :-)
> > 
> > 
> > Johan.
> > 
> > ----- Original Message -----
> > From: "Sarika N Inamdar" <si...@cisco.com>
> > To: <to...@jakarta.apache.org>
> > Sent: Wednesday, September 17, 2003 12:17 PM
> > Subject: Redirecting the output to a log file
> > 
> > 
> > > Hi All,
> > > When my servlets are sending some stack trace or System.out
> > messages ,
> > > all such output is dumped in the catalina.out log. We want the
> > > System.out messages to go into our application's log file. 
> > I am using
> > > standalone catalina on Solaris and tomcat 4.1.24. Please 
> suggest on
> > > how to proceed to achieve the same. Thanks in Advance,
> > > Sarika
> > >
> > >
> > >
> > > 
> > 
> ---------------------------------------------------------------------
> > > 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
> 
> 
> ---------------------------------------------------------------------
> 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