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

[FR]: Log retention #656

Closed
1 of 2 tasks
daviddanko opened this issue Sep 21, 2024 · 2 comments · Fixed by #666
Closed
1 of 2 tasks

[FR]: Log retention #656

daviddanko opened this issue Sep 21, 2024 · 2 comments · Fixed by #666
Assignees
Labels
feature request New feature or request status:added-to-develop Feature Request or Bug Fix is in Develop

Comments

@daviddanko
Copy link

daviddanko commented Sep 21, 2024

Is your feature request related to a problem? Please elaborate.

I would like to request a feature that allows for configuration of log retention policies. Currently, qbit_manage generates logs for indefinitely and we don’t have native mechanisms for purging logs after a certain period.

Describe the solution you'd like

Introduce an environment variable or config file option that can define:

  • Maximum log file size (in MB).
  • Maximum number of log files to retain.
  • Maximum log retention period (e.g., 7 days).

Does your solution involve any of the following?

  • New config option
  • New command option

Describe alternatives you've considered

N/A

Who will this benefit?

Everyone

Additional Information

No response

@daviddanko daviddanko added the feature request New feature or request label Sep 21, 2024
@bobokun
Copy link
Collaborator

bobokun commented Oct 5, 2024

It's actually not indefinite, right now it's hardcoded to 10MB per file with a maximum of 5 files.

bobokun added a commit that referenced this issue Oct 5, 2024
@bobokun bobokun added the status:added-to-develop Feature Request or Bug Fix is in Develop label Oct 5, 2024
@bobokun
Copy link
Collaborator

bobokun commented Oct 5, 2024

You can use QBT_LOG_SIZE and QBT_LOG_COUNT now to determine the size (in MB) or the number of logs to keep via environment variables. CLI can be used as well --log-size / --log-count . This won't cleanup any existing logs so you would need to delete those yourself first. You can test this in the develop branch

bobokun added a commit that referenced this issue Oct 5, 2024
@bobokun bobokun mentioned this issue Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request status:added-to-develop Feature Request or Bug Fix is in Develop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants