-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Blocking flush on async_logger #1696
Labels
Comments
Try call |
Further logging is then impossible: |
Yes. |
I realize this is feature request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
spdlog::async_logger::flush()
is non-blocking operation. Flush is scheduled for later.I would like to have blocking variant that will wait untill everything that was scheduled for logging untill now is flushed by all sinks.
My usecase is that I want to be be sure that everything I wanted to log is safe on disk and can be passed for further processing outside program.
Frankly I don't see value in flush operation that doesn't flush NOW and only promises it will be done later. It will be done later anyway, at shutdown at latest.
The text was updated successfully, but these errors were encountered: