
On Mon, Apr 04, 2016 at 06:01:18PM -0400, Stephen wrote:
I have Apache running on my system for web development with php.
Apache writes to an error.log file unique for the specific web site that I am working on.
During debugging the log file grows, and I like to clear it every now and then.
I had to change ownership of the file to me. I five read/write to everyone.
But when I truncate the file and save, Apache no longer writes to it. The Apache error logs do not indicate a problem.
I restart Apache and all is good again. But this is a nuisance.
Is there a way to avoid this nuisance?
Apache has the file open with the current seek location known. The fact you truncate the file is not apache's problem and it will keep writing where it got to. If you want to do that, you have to signal to it that you want it to reopen the log file, which usually a reload (often sending SIGHUP) will do. -- Len Sorensen