tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Harper" <rob...@iat-cti.com>
Subject RE: Managing Tomcat logs
Date Tue, 22 Jun 2004 14:20:15 GMT
Instead of using System.out.println() to log your messages, use the
HttpServlet's log() method. You can specify the logging class you want to use,
the path it writes to, the base name, and extension. Each day a new file is
created and you can simply delete the old ones as they are closed when a new
file is started each day. You could also create your own logger that manages the
file size in some way. I have used the former and have specified the file name
and path so that it easy form me to manage. My logs are separate from the normal
logs as well.

Robert S. Harper
801.265.8800 ex. 255

> -----Original Message-----
> From: Veera Sivakumar [mailto:vsivakumar@rm.com]
> Sent: Tuesday, June 22, 2004 3:47 AM
> To: Tomcat Users List
> Subject: Managing Tomcat logs
> 
> Hi,
> I am using Tomcat as web server for my application. I start Tomcat using
> windows service. All the logs generated by the Application are written in to a
> file called stdout.log which is under tomca/logs folder.
> I have noticed that with continuous use of application,stdout file size
> increasing to a large extent. To delete the it I have to stop the tomcat.
> Is there any way that I can manage the logs date wise automatically(without
> manual intervention). I am not using any third party tool for logging.
> The logging mechanism I use is very simple.
> 
> We have class Debug.java that have a method log(String);
> This log() method use System.out.println();
> In the application, I use Debug.log("Exception");
> 
> I will be more happy if there is any way to manage logs.
> I have also noticed the following logs generated by Tomcat:
> 1.localhost_log.2004-06-18.txt
> 2.localhost_access_log.2004_06_22.txt
> 
> How to maintain these logs?. Can we off them permanently?
> Thanks in advance.
> 
> Regards
> S.V.Sivakumar
> QCA Project
> Tata Infotech Limited
> Tel:	+44 1235 823411
> vsivakumar@rm.com / veera.surathu@tatainfotech.com
> 
> Visit our website at http://www.rm.com
> 
> This message is confidential.  You should not copy it
> or disclose its contents to anyone.  You may use and apply the information
> only for the intended purpose.  Internet communications are not secure and
> therefore RM does not accept legal responsibility for the contents of this
> message.  Any views or opinions presented are only those of the author and
> not those of RM.  If this email has come to you in error please delete it
> and any attachments.  Please note that RM may intercept incoming and
> outgoing e-mail communications.
> 
> This email has been scanned for viruses by Trend ScanMail.



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


Mime
View raw message