go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

feature request: logx should support log rotation based on log file size

Open SgtDaJim opened this issue 2 years ago • 4 comments

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

SgtDaJim avatar Mar 16 '22 04:03 SgtDaJim

Is there any progress on this issue?It was marked stale by the robot...

SgtDaJim avatar Jun 10 '22 07:06 SgtDaJim

What if I make a pr on this issue? This feature is kind of important for me... My pods keep being evicted everyday..

SgtDaJim avatar Jun 13 '22 10:06 SgtDaJim

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 14 '22 02:07 github-actions[bot]

This issue is stale again. I've made a pr about this. PTAL.

SgtDaJim avatar Jul 18 '22 11:07 SgtDaJim

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 22 '23 01:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Mar 21 '24 01:03 github-actions[bot]