YunoHost / packages_old

[not used anymore] YunoHost Debian package sources
http://yunohost.org
8 stars 7 forks source link

logrotate for /var/log/yunohost #14

Open julienmalik opened 10 years ago

julienmalik commented 10 years ago

Should be a simple conf in /etc/logrotate.d

opi commented 9 years ago

Adding /etc/logrotate.d/yunohost with the following configuration seems good ?

/var/log/yunohost.log {
    weekly
    rotate 12

    missingok
    notifempty
    compress
    delaycompress
}
julienmalik commented 9 years ago

i filed this issue at a time where things were different, and i had a new log file at each startup, with the date appended to the log filename. this is not the case anymore : /var/log/yunohost.log only contains the postinstall logs.

what's about yours ?

julienmalik commented 9 years ago

about the logrotate conf, this needs some testing. daemons may not like when logrotate takes away their log file.

might need to reload/restart the api with "postrotate". look at other logrotate.d scripts for samples.

opi commented 9 years ago

what's about yours ?

It contains yunohost-api log, even on runtime. Try to restart yunohost-api service for example

might need to reload/restart the api with "postrotate".

+1

Kloadut commented 9 years ago

+1

julienmalik commented 9 years ago

on my "daily" server I now have a directory /var/log/yunohost, with 2 files in it : yunohost-cli.log and yunohost-api.log they do not seem to be log-rotated

on my stable server I don't have this directory, so I have no logs