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

spdlog::shutdown() #3096

Open
jphz opened this issue May 26, 2024 · 2 comments
Open

spdlog::shutdown() #3096

jphz opened this issue May 26, 2024 · 2 comments

Comments

@jphz
Copy link

jphz commented May 26, 2024

Will the remaining logs in the buffer be written?

@tt4g
Copy link
Contributor

tt4g commented May 26, 2024

Short answer: the sink is destroyed and the buffer is written.

Long answer: the sink registered in the spdlog registry is destroyed and is written from the buffer in the destructor of the sink. However, there is no guarantee that the data in the buffer will be written since the destructor of sink is not called if a reference to sink remains in another location.

@jphz
Copy link
Author

jphz commented May 26, 2024

I think I understand now, thank you.

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