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/deki-hayes)
By default dekiwiki creates the following log files:
$WIKI_DIR/bin/logs/trace.log
$WIKI_DIR/bin/logs/warning.log
$WIKI_DIR/bin/logs/info.log
/var/log/deki-api.log
Since /var/log/deki-api.log contains all the log information you'll need, you can easily disable the logs in $WIKI_DIR/bin/logs by doing the following:
Edit: $WIKI_DIR/bin/mindtouch.host.exe.config and comment out (or delete) these lines:
<!-- <appender-ref ref="RollingFile-trace" /> --> <!-- <appender-ref ref="RollingFile-info" /> --> <!-- <appender-ref ref="RollingFile-warn" /> -->
Then restart dekihost for the changes to take affect:
/etc/init.d/dekihost restart
To move the deki-api.log to a different directory (for example: /var/log/dekiwiki/deki-api.log) do the following:
mkdir /var/log/dekiwiki chown www-data /var/log/dekiwiki
Edit: $WIKI_DIR/bin/mindtouch.host.sh and change the following:
LOGFILE="/var/log/deki-api.log"
to:
LOGFILE="/var/log/dekiwki/deki-api.log"
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/deki-api.log {
daily
rotate 7
missingok
copytruncate
compress
}
To test the log rotation you can do:
logrotate -f /etc/logrotate.d/dekiwki