Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 35872 invoked from network); 21 Jul 2006 16:53:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 16:53:10 -0000 Received: (qmail 8717 invoked by uid 500); 21 Jul 2006 16:52:58 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 8693 invoked by uid 500); 21 Jul 2006 16:52:58 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 8660 invoked by uid 99); 21 Jul 2006 16:52:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 09:52:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [128.253.83.141] (HELO authusersmtp.mail.cornell.edu) (128.253.83.141) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 09:52:57 -0700 Received: from [128.253.38.244] (defiant.ento.cornell.edu [128.253.38.244]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id k6LGqao3014088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 21 Jul 2006 12:52:36 -0400 (EDT) Message-ID: <44C10654.6010305@cornell.edu> Date: Fri, 21 Jul 2006 12:52:36 -0400 From: David Smith User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: log rotation References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N catalina.out is the redirected output of tomcat -- not a product of log4j or commons-logging. As such you're best bet is to have a cron job stop tomcat, rename the file and then restart it at say 6:00am when the internet hits the lowest ebb of demand. That method should be safe for all OS's. Unix/Linux seem to handle the sudden disappearance of a file well (or at least better than Windows) and simply create a new one. Just renaming the file without stop/start may be an option for you on *nix systems. --David Mirou, Antoine wrote: >Hello, > >What is the easiest way to do a log rotation with tomcat ? > >For example, I'd like to rotate catalina.out on a daily basis and have up to 5 versions kept. How can I do it ? > >Antoine Mirou > > > >Ce message et toutes les pi�ces jointes (ci-apr�s le � message �) sont confidentiels et �tablis � l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme � sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. Si vous recevez ce message par erreur, merci de le d�truire sans en conserver de copie et d'en avertir imm�diatement l'exp�diteur. Internet ne permettant pas de garantir l'int�grit� de ce message, la Caisse des D�p�ts et Consignations d�cline toute responsabilit� au titre de ce message s'il a �t� modifi�, alt�r�, d�form� ou falsifi�. > >This email message and any attachments ("the email") are confidential and intended only for the recipient(s) indicated. If you are not an intented recipient, please be advised that any use, dissemination, forwarding or copying of this email whatsoever is prohibited without Caisse des Depots et Consignations's prior written consent. If you have received this email in error, please delete it without saving a copy and notify the sender immediately. Internet emails are not necessarily secured, and Caisse des Depots et Consignations declines responsibility for any changes that may have been made to this email after it was sent. > > >--------------------------------------------------------------------- >To start a new topic, e-mail: users@tomcat.apache.org >To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >For additional commands, e-mail: users-help@tomcat.apache.org > > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org