Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jul 2011
Log rotation without restarting the application
- The application might be able to do logrotation on its own
- the application at least has a signalhandler, which will cause it to release the handle of the logfile and open another one
- the application can log to a pipe. Apache is an example. Then tools like managelogs or cronolog can be used to deal with logs.
- Not really a good way: One could copy the logfile, and after that cat /dev/null >logfile.
The application doesnt need a restart and it will happily continue writing to the filehandle.
But the copied logfile might not contain the latest lines.You must always face the curtain with a bow.