Skip to content
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

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

Closed
SgtDaJim opened this issue Mar 16, 2022 · 6 comments
Closed
Assignees
Labels

Comments

@SgtDaJim
Copy link
Contributor

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 SgtDaJim changed the title logx should support log rotation based on log file size feature request: logx should support log rotation based on log file size Mar 16, 2022
@kevwan kevwan added the suggestion Sugguestions label Mar 16, 2022
@kevwan kevwan self-assigned this Mar 16, 2022
@github-actions github-actions bot added the stale label Apr 16, 2022
@SgtDaJim
Copy link
Contributor Author

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

@zeromicro zeromicro deleted a comment from github-actions bot Jun 10, 2022
@zeromicro zeromicro deleted a comment from github-actions bot Jun 10, 2022
@kevwan kevwan reopened this Jun 10, 2022
@github-actions github-actions bot removed the stale label Jun 11, 2022
@SgtDaJim
Copy link
Contributor Author

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

@github-actions
Copy link

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

@SgtDaJim
Copy link
Contributor Author

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

SgtDaJim added a commit to SgtDaJim/go-zero that referenced this issue Jul 18, 2022
…#1652)

implementation of zeromicro#1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
SgtDaJim added a commit to SgtDaJim/go-zero that referenced this issue Jul 18, 2022
…#1652)

implementation of zeromicro#1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
SgtDaJim added a commit to SgtDaJim/go-zero that referenced this issue Jul 19, 2022
…#1652)

implementation of zeromicro#1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
SgtDaJim added a commit to SgtDaJim/go-zero that referenced this issue Jul 19, 2022
…#1652)

implementation of zeromicro#1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
SgtDaJim added a commit to SgtDaJim/go-zero that referenced this issue Jul 19, 2022
…#1652)

implementation of zeromicro#1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
SgtDaJim added a commit to SgtDaJim/go-zero that referenced this issue Jul 20, 2022
…#1652)

implementation of zeromicro#1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
SgtDaJim added a commit to SgtDaJim/go-zero that referenced this issue Jul 20, 2022
…#1652)

implementation of zeromicro#1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
@github-actions github-actions bot removed the stale label Jul 21, 2022
kevwan pushed a commit that referenced this issue Jul 22, 2022
…2167)

* feat: logx support logs rotation based on size limitation. (#1652)

implementation of #1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.

* feat: logx support logs rotation based on size limitation. (#1652)

implementation of #1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.

* feat: logx support logs rotation based on size limitation. (#1652)

implementation of #1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.

* feat: logx support logs rotation based on size limitation. (#1652)

implementation of #1652

Totally compatible with the old logx.LogConf. No effect if users do not change their options.
@github-actions
Copy link

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

@github-actions github-actions bot added the stale label Jul 22, 2023
Copy link

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants