Forum

log rotation

KGB
2 July 2009, 21:32
Is there a way to rotate logs w/o restarting hiawatha (lost established connections)?

Hiawatha version:
Operating System:
Hugo Leisink
3 July 2009, 00:32
The program 'logrotate' was made to do that. It comes with every Linux distro and BSD variant.
KGB
3 July 2009, 00:44
ok, but if logrotate moves files hiawatha don't start log in new files
Hugo Leisink
3 July 2009, 01:12
No, you should let logrotate create new logfiles. Use this logrotate configuration to start with:
/var/log/hiawatha/access.log {
weekly
compress
delaycompress
rotate 52
missingok
create 640 www-data www-data
sharedscripts
}


It was made for Debian Linux. It probably needs some editing for FreeBSD.
KGB
3 July 2009, 01:33
ok this works fine. before i had wrong permissions, sorry.
Hugo Leisink
3 July 2009, 09:35
No problem. Glad I could help.
This topic has been closed.