|
|
How do I...Manage log files?From $1Dekihost 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: How do I disable the logs in $WIKI_DIR/bin/logs?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 How do I change the location of /var/log/deki-api.log?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
How do I rotate my dekiwiki log using logrotate?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
create 640 www-data adm
compress
postrotate
/etc/init.d/dekihost restart
endscript
}
To test the log rotation you can do: logrotate -f /etc/logrotate.d/dekiwki
タグ:
|