Skip to content

Support unbundled version of fmt in spdlog #4

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pfmephisto
Copy link

This change includes spdlog/fmt/chrono.h instead of spdlog/fmt/bundled/chrono.h, which will include the correct version of fmt depending on if it was bundled with spdlog or not.

Furthermore, the fmt::memory_buffer now seems to need to be used with the fmt::appender and can not be passed directly to format_to.

Lastly, the variable space_for_bar is cast to an int instead of an unsigned int, as otherwise, the following size check would always return true. In cases where the width is not sufficient, it would then try to fill a progress bar with a width close to max unsigned int due to an integer underflow.

@pfmephisto
Copy link
Author

The custom logger should also be dropped when LoggerProgress is destroyed, as there will be collisions should multiple LoggerProgress instances be created.

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

Successfully merging this pull request may close these issues.

1 participant