tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Web2 Solutions <m...@web2-solutions.com>
Subject Re: Apache 7, Logrotate
Date Mon, 28 Oct 2013 06:53:08 GMT
Hallo Rainer,

> Rainer Jung <mailto:rainer.jung@kippdata.de>
> 27 Oct 2013 14:23
>
> Only for the access log: there's a property checkExists="true", that
> will close the file and reopen it if the access log valve detects the
> file has been moved/renamed. That option could be more expensive though
> then just using an appropriate value for fileDateFormat.
great! I did not know about it. Let me try it. So I'm left only with 
catalina.out.
Thank you!

>
> Regards,
>
> Rainer
Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> Konstantin Kolinko <mailto:knst.kolinko@gmail.com>
> 25 Oct 2013 11:54
> 2013/10/25 Web2 Solutions<mail@web2-solutions.com>:
>> Hallo All,
>>
>> I've installed tomcat 7.0.42 and due heavy use my catalina.out and
>> localhost_access-jjj-mm-dd.txt grows quit big.
>>
>> I've successfully configured logrotate to rotate both files. I've removed
>> the date from the access log.
>> So Tomcat now writes without rotating into localhost_access.txt
>>
>> Logrotate now create a new file (localhost_access-dd-mm-dd.txt) and makes
>> localhost_access.txt empty.
>> But tomcat now writes into the new localhost_access-dd-mm-dd.txt instead of
>> the configured file (localhost_access.txt).
>
> FYI:
> You can configure the filename pattern so that it rotates more frequently,
> e.g. every hour or every ten minutes.
>
>> What do I have todo so that tomcat continues to write into
>> localhost_access.txt  even after rotating?
>
> Renaming the file is futile, because Tomcat (for access logs) or the
> shell (for catalina.out)
> has the file open and continues to write to it, regardless of the file name.
>
> You can use copytruncate option of logrotate.
>
> FYI: catalina.out is not a proper log file, but a redirection of
> stdout (as managed in catalina.sh script that launches Tomcat java
> process). If a system is configured properly, this file is usually
> empty.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> Web2 Solutions <mailto:mail@web2-solutions.com>
> 25 Oct 2013 00:33
> Hallo All,
>
> I've installed tomcat 7.0.42 and due heavy use my catalina.out and 
> localhost_access-jjj-mm-dd.txt grows quit big.
>
> I've successfully configured logrotate to rotate both files. I've 
> removed the date from the access log.
> So Tomcat now writes without rotating into localhost_access.txt
>
> Logrotate now create a new file (localhost_access-dd-mm-dd.txt) and 
> makes localhost_access.txt empty.
> But tomcat now writes into the new localhost_access-dd-mm-dd.txt 
> instead of the configured file (localhost_access.txt).
>
> What do I have todo so that tomcat continues to write into 
> localhost_access.txt  even after rotating?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Mime
View raw message