logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large. http://iain.cx/src/logrotate/
and logrotate parameter copytruncate copytruncate Truncate the original log file to zero size in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus might con- tinue writing (appending) to the previous log file forever. Note that there is a very small time slice between copying the file and truncating it, so some logging data might be lost. When this option is used, the create option will have no effect, as the old log file stays in place. http://www.mythtv.org/wiki/Log_File_Rotationlog4j and commons-logging are loggind implementations specific to TC logging http://tomcat.apache.org/tomcat-6.0-doc/logging.html apparently logrotate (with copyrotate option) has the widest range of logging activity for application, cron and webapps available ? Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: vijay2...@gmail.com > Date: Mon, 25 May 2009 10:36:15 -0700 > Subject: Re: tomcat Access logs > To: users@tomcat.apache.org > > Hi, > Any help will be useful... should i write a custom log4j class instead of > accessvalve class in tomcat? > > Regards, > </VJ> > > > > > On Thu, May 21, 2009 at 4:06 PM, Vijay <vijay2...@gmail.com> wrote: > > > Hi, > > I am using a tomcat tailer which needs the file name to be the same and not > > changinging (Dont want to see the Date in the file name). hence i want a > > solution to have the logs rotated as well as the file name of the active log > > files to remain the same.... Do we have a solution like it? > > > > When i search in the internet i found logrotate copytruncate option > > available, can we use this? whats the implication? do you guys recommend it? > > > > Regards, > > </VJ> > > _________________________________________________________________ Hotmail® has a new way to see what's up with your friends. http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009