Forum Discussion
Aftab_1138
Nimbostratus
Mar 30, 2009Rotating custom log file
I have a log file setup in my system that captures logs from an iRule (using syslog-ng include file). I want to rotate the file on an hourly basis while keeping the other log files rotation the same (which is daily right now). I looked around and tried to implement a solution the following article:
https://support.f5.com/kb/en-us/solutions/public/8000/400/sol8430.html
I created a new log file under /etc with the following in it:
rotate log files daily
hourly
logrotate_enhance controls the log files life cycle
rotate 24
create new (empty) log files after rotating old ones
create
compress
compresscmd /usr/bin/nicegzip
w3c log rotation
/var/log/w3c {
hourly
compress
missingok
notifempty
}
Then I copied the logrotate script from /etc/cron.daily to /etc/cron.hourly and changed the logrotate.conf to my new config file (contents shown above). This does not seem to work. Is this the right way to accomplish my task?
- Aftab_1138
Nimbostratus
I also tried the following include to try to rotate the log file using the configured daily schedule and this did not work either: - smp_86112
Cirrostratus
Were you ever able to resolve this? I have the same requirement, but I'm having trouble getting this to work too. - sprashanthac_81
Nimbostratus
This is for the 10.x
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects