The Raspberry pi creates various log files. The daily Logrotate (/etc/cron.daily/logrotate) prevents the number of files from becoming so large that the SD card fills up.
In principle, you do not have to do anything about this. Logrotate is configured via file /etc/logrotate.conf. Here is an include to folder /etc/logrotate.d in which log management for various packages is arranged.
I’ve checked the /var/log directory for some time and for me the defaults of Logrotate seem to be adequate except Nextcloud and MiniDLNA.
I have changed the log location for Nextcloud.
In file /var/www/html/nextcloud/config/config.php I have added:
‘logfile’ => ‘/var/log/nextcloud/nextcloud.log’,
Nextcloud should be able to handle logfile rotation but ,I could not find any information about the number of logfiles that are kept. So I rely on Logrotate. I have added file /etc/logrotate.d/nextcloud
The content of the file is copied from internet.
/var/log/nextcloud/nextcloud.log {
rotate 6
monthly
compress
delaycompress
missingok
notifempty
create 640 www-data adm
}
MiniDLNA seems to come without a logging strategy. I therefore added file /etc/logrotate.d/minidlna
The content of the file is also copied from internet.
/var/log/minidlna/minidlna.log
{
rotate 4
weekly
missingok
notifempty
delaycompress
compress
create 0640 minidlna minidlna
postrotate
service minidlna rotate > /dev/null
endscript
}
Previous page