move nextcloud logging to syslog

This commit is contained in:
KiekerJan 2022-09-08 22:23:07 +02:00
parent c74069923f
commit e3a91ece00
4 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
/var/log/roundcubemail/errors.log
/var/log/roundcubemail/sendmail.log
/var/log/nextcloud.log
{
rotate 4
weekly

View File

@ -0,0 +1,4 @@
:syslogtag, startswith, "Nextcloud" -/var/log/nextcloud.log
# Stop logging
& stop

View File

@ -13,6 +13,9 @@ sed -i "s/\*\.\*;auth,authpriv.none.*\-\/var\/log\/syslog/\*\.\*;mail,auth,authp
# Reduce logs by only logging ufw in ufw.log
sed -i "s/#\& stop/\& stop/g" /etc/rsyslog.d/20-ufw.conf
# Add nextcloud logging
hide_output install -m 644 conf/rsyslog/20-nextcloud.conf /etc/rsyslog.d/
restart_service rsyslog
# Create forward for root emails

View File

@ -334,6 +334,8 @@ include("$STORAGE_ROOT/owncloud/config.php");
\$CONFIG['logtimezone'] = '$TIMEZONE';
\$CONFIG['logdateformat'] = 'Y-m-d H:i:s';
\$CONFIG['log_type'] = 'syslog',
\$CONFIG['syslog_tag'] = 'Nextcloud',
\$CONFIG['mail_domain'] = '$PRIMARY_HOSTNAME';