Dekihost uses log4net to generate log files.
NOTE: In the examples below, $WIKI_DIR is the location to your Deki Wiki installations (for example: /var/www/dekiwiki)
By default dekiwiki creates the following log file:
/var/log/dekiwiki/deki-api.log
To change the location of the deki-api.log edit:
/etc/dekiwiki/mindtouch.host.conf
and change the following variables:
# directory to store dekiwiki log files LOGDIR="/var/log/dekiwiki" # location of the dekiwiki API log file LOGFILE="$LOGDIR/deki-api.log"
Make sure the dekiwiki user (www-data or dekiwiki depending on the type of your install) has write access:
Deki VM
chown www-data /var/log/dekiwiki
Deki RPM/.deb package:
chown dekiwiki /var/log/dekiwiki
Finally, restart dekihost for the changes to take affect:
/etc/init.d/dekihost restart
In a text editor, create the following file: /etc/logrotate.d/dekiwki
# rotate the dekiwiki api log daily
/var/log/dekiwiki/deki-api.log {
daily
rotate 7
missingok
copytruncate
compress
}
To test the log rotation you can do:
logrotate -f /etc/logrotate.d/dekiwiki