-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feature: implemented plugin log-rotate, rotate log by interval time.
#2097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@nic-chen I think we can merge this PR now |
| local prefix = ngx.config.prefix() | ||
|
|
||
| if conf_path then | ||
| local root = string.sub(conf_path, 1, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use string.byte(conf_path, 1, 1), and compare it with ascii number.
| local dir = string.sub(conf_path, 1, n) | ||
| local name = string.sub(conf_path, n + 1) | ||
| return dir, name | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to move the stuff above into two function: is_abs and split_path in a utility file so that other people can reuse it.
|
@spacewander We urgently need this feature, I will merge it first, and will deal with the optimization items later. thank you very much. |
What this PR does / why we need it:
as title.
Pre-submission checklist: