RE : RE : Redirecting the output to a log file

2003-09-25 Thread Laurent Michenaud
Maybe with debug=0

Anyway, u should use log4j instead of System.out

-Message d'origine-
De : Sarika N Inamdar [mailto:[EMAIL PROTECTED] 
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:[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]


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



Re: RE : Redirecting the output to a log file

2003-09-24 Thread Tim Funk
Not really, that is why we all keep recommending commons-logging or log4j.

-Tim

Sarika N Inamdar wrote:

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
 
 


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


RE: RE : Redirecting the output to a log file

2003-09-23 Thread Sarika N Inamdar
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]