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

force the logger to doing rotate #2997

Closed
yossi-sydon opened this issue Feb 1, 2024 · 3 comments
Closed

force the logger to doing rotate #2997

yossi-sydon opened this issue Feb 1, 2024 · 3 comments

Comments

@yossi-sydon
Copy link

hey everyone there is way to do rotating of logger/sinks-in-logger to do rotate when i want ? without related to size of file that currently open ?
-currently i am using logger that use sinks::rotating_file_sink_mt and do rotate when current file get to max size , but i want to add functionality to do rotate also by time that mean that every x sec files will be rotate

@tt4g
Copy link
Contributor

tt4g commented Feb 1, 2024

It cannot be rotated from outside of sink.
But you can create a custom sink: https://github.com/gabime/spdlog/wiki/4.-Sinks#implementing-your-own-sink

@yossi-sydon
Copy link
Author

thanks :)

@yossi-sydon
Copy link
Author

thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants