apisix icon indicating copy to clipboard operation
apisix copied to clipboard

feat: config time of log-rotate plugin work

Open mikawudi opened this issue 1 year ago • 3 comments

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 E8005A50-7B76-4454-A8C0-486174F53A65

mikawudi avatar Aug 19 '22 06:08 mikawudi

@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 avatar Aug 19 '22 10:08 kingluo

@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

spacewander avatar Aug 21 '22 12:08 spacewander

@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

mikawudi avatar Aug 22 '22 03:08 mikawudi

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.

github-actions[bot] avatar Aug 15 '23 10:08 github-actions[bot]

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.

github-actions[bot] avatar Aug 30 '23 10:08 github-actions[bot]