We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I saw a similar question about truncating log, but I want to create a new log file once reaches 20MB or some other metric (keeping the previous).
is there a way to achieve this?
The text was updated successfully, but these errors were encountered:
I also need this feature. Have you implemented this feature?
Sorry, something went wrong.
This hasn't been implemented, no. It wouldn't be the biggest change, but it hasn't been done!
To add this, we really just need to copy the DateBasedConfig implementation in log_impl.rs (https://github.com/daboross/fern/blob/main/src/log_impl.rs#L169-L261) and builders.rs (https://github.com/daboross/fern/blob/main/src/builders.rs#L541-L565), replacing DateBased with SizeBased and rotating in log_impl based on total size rather than date. A simple test like https://github.com/daboross/fern/blob/0ef6202750e9854e619b279a3ac33904bc5a82a4/examples/date-based-file-log.rs would be ideal too, but beyond that, just follow the compiler errors.
DateBasedConfig
log_impl.rs
builders.rs
SizeBased
Tests as well would be ideal, but the base should be pretty simple. I've just not implemented that yet.
Successfully merging a pull request may close this issue.
I saw a similar question about truncating log, but I want to create a new log file once reaches 20MB or some other metric (keeping the previous).
is there a way to achieve this?
The text was updated successfully, but these errors were encountered: