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:[EMAIL PROTECTED] 
> Sent: Wednesday, September 17, 2003 4:13 PM
> To: Tomcat Users List; [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED] 
> 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:[EMAIL PROTECTED]
> > Sent: Wednesday, September 17, 2003 3:59 PM
> > To: Tomcat Users List; [EMAIL PROTECTED]
> > 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" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > 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: [EMAIL PROTECTED]
> > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > >
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to