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

#12524: Update fmt and unify logging API #12464

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

yan-zaretskiy
Copy link
Contributor

@yan-zaretskiy yan-zaretskiy commented Sep 10, 2024

Related Issue

#12524

Problem description

Our logging macros accept variadic arguments and print them as-is, requiring callers to use fmt::format to prepare the arguments. But the low-level functions (log_fatal, log_warning and so on) accept a runtime format string.

What's changed

This PR unifies the logging API by requiring users to always specify a valid format string, and avoids runtime formatting. To achieve this, I had to update the vendored fmt version. It now matches the version used by UMD.

Checklist

  • Post-commit tests
  • BH post-commit tests

@yan-zaretskiy yan-zaretskiy changed the title #0: Update fmt and unify logging API #12524: Update fmt and unify logging API Sep 11, 2024
@yan-zaretskiy
Copy link
Contributor Author

@razorback3 @dongjin-na Could I get you approval for this PR?

Our logging macros accept variadic arguments and print them as-is,
requiring callers to use fmt::format to prepare the arguments. But the
low-level log_fatal, log_warning and so on functions accept a runtime
format string.

This PR unifies the logging API by requiring users to always specify a
valid format string, and avoids runtime formatting.
@tt-rkim tt-rkim merged commit 1ee5e43 into main Sep 12, 2024
6 checks passed
@tt-rkim tt-rkim deleted the yan-zaretskiy/remove-fmt-runtime branch September 12, 2024 15:23
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.