> On Oct 25, 2013, at 6:56 AM, "Internet Lösungen für Klein & Gross " 
> <m...@web2-solutions.com> wrote:
> 
>> 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.
> Ok, got that. I could see it though not understand. Thx.
> So what can I do to unlink it from the new file and link it back to its 
> original (empty) file)

I think here is where you get confused.  The "original (empty) file" is not the 
original file.  It is a new file that happens to have the same name as the the 
one that was renamed.  The true original file is the one that was renamed and 
tomcat continues to use it completely unaware of your rename.  

Configuring your apps to use a true logging system and configuring the log 
system to rotate is the best option.  Barring that, it get's tricky.  You might 
be able to get away with copying the log file to another and then truncating 
the original but I think that only really works on *nix based systems.  Windows 
if memory serves will pad the truncated file with empty space and append right 
were it left off.  

There has been discussion on the list in the past about this if your interested 
in doing some searching.

--David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to