I noticed that dcron does not insert a snippet in /etc/logrotate.d in order to have /var/log/cron.log automatically rotated. I think it would be important to provide one, since an evergrowing logfile could fill all the available space, possibly with weird effects if /var or /var/log is not on its own partition.
i dont know anything about logrotate ... i use metalog so this has never been an issue :) please post a sample config file and i'll gladly add it to dcron
Created attachment 41462 [details] Logrotate snippet for dcron This is the sample config file you asked me for. :-)
Hi there, I am reopening the bug just to provide the requested logrotate snippet for dcron. Hope it will be included soon and the bug definitely closed. :-)
will do :)
Comment on attachment 41462 [details] Logrotate snippet for dcron ># dcron logrotate snippet for Gentoo Linux ># contributed by BlueRaven ># > >/var/log/cron.log { >}
Hi, my proposed snippet was wrong... dcron keeps file descriptors always open, so using logrotate's "create" instruction breaks functionality. Please find an updated snippet in the previous comment, sorry for any inconvenience.
so all the file has to contain is this ? /var/log/cron.log { }
Well, in fact no... I noticed it was not working, too. Please accept my apologizes, my pusher is decreasing his quality standards. ;-) After some RTFM, I found out a working configuration: /var/log/cron.log { copytruncate } The "copytruncate" directive is necessary in order to keep the same file inode.
so i add that little snippet to 'files/dcron.logrotate' and then i add this to the ebuild: insinto /etc/logrotate.d newins ${FILESDIR}/dcron.logrotate dcron and that should be enough ? (sorry, but ive never used logrotate before)
Yes, that's enough! :-)
added to cvs, thanks :)