apisix
apisix copied to clipboard
feat: config time of log-rotate plugin work
Description
log-rotate work on
first:
rotate_time = now_time + interval - (now_time % interval)
update:
rotate_time = rotate_time + interval
when i set interval = 86400 and compression = true, i wan't the log-rotate rename and compression access and error log every day, but now_time is timestamp of second.....server timezone in +08:00, so it work at 08:00 am every day.....
can i add an config field to offset the work time? because 08:00 is busy time......compression big access log file in busy time is not a good idea
@mikawudi @spacewander Is it a good idea to do the log rotate based on cron-like expr?
# run five minutes after midnight, every day
5 0 * * *
@mikawudi @spacewander Is it a good idea to do the log rotate based on cron-like expr?
# run five minutes after midnight, every day 5 0 * * *
LGTM
@mikawudi @spacewander Is it a good idea to do the log rotate based on cron-like expr?
# run five minutes after midnight, every day 5 0 * * *
@kingluo i think it's a good idea
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.