logrotate(8) and copytruncate as default

P J P pj.pandit at yahoo.co.in
Thu Jun 27 19:45:03 UTC 2013


  Hello Mirek,
----- Original Message -----
> From: Miloslav Trmač <mitr at volny.cz>
> Subject: Re: logrotate(8) and copytruncate as default
>
> * logrotate reads all contents of file until EOF
> * application appends one more data line
> * logrotate calls truncate()


   I see. Thanks for these input, will consider these during further experiments.
I wonder how will application append one more line, if the file is locked.

 
> (And yes, journald solves that by integrating the log rotation with
> the log writer, which is a better design, and there's no inherent
> reason why rsyslog couldn't be doing something similar.  Then there
> are only the dozens? of applications that don't go through syslog at
> all and write their own log files to also handle...)


   Ah okay.  So, journald does both logging data and rotating files. Interesting.


---
Regards
   -Prasad
http://feedmug.com


More information about the devel mailing list