go-zero
go-zero copied to clipboard
feature request: logx should support log rotation based on log file size
Is your feature request related to a problem? Please describe. At present, logx in go-zero's core support log rotation based on date. But it is not enough. In k8s,users can request and set limit on ephemeral-storage resource. But sometimes the admins of k8s might set the request maximum a little lower, to protect the node. So even if users try their best to reduce the log in their apps, and set the log rotation frequence on 1day, the pods of apps may still be evicted because of over the ephemeral-storage limit. Therefore, logx should support log rotation based on log file size.
Describe the solution you'd like The log file rotated when it is up to the size i set in logx config.
Describe alternatives you've considered
Additional context
Is there any progress on this issue?It was marked stale by the robot...
What if I make a pr on this issue? This feature is kind of important for me... My pods keep being evicted everyday..
This issue is stale because it has been open for 30 days with no activity.
This issue is stale again. I've made a pr about this. PTAL.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.