Skip to content

Use correct log functions for std::format to work #10035

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

grendello
Copy link
Contributor

No description provided.

@grendello grendello requested a review from jonpryor as a code owner April 15, 2025 17:00
@@ -142,7 +142,7 @@ abort_if_negative_integer_argument (int arg, const char *arg_name, std::source_l
[[gnu::always_inline]]
inline void pd_log_location (std::source_location sloc = std::source_location::current ()) noexcept
{
log_info_nocheck (LOG_DEFAULT, "loc: {}:{} ('{}')", sloc.file_name (), sloc.line (), sloc.function_name ());
log_warn (LOG_DEFAULT, "loc: {}:{} ('{}')", sloc.file_name (), sloc.line (), sloc.function_name ());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change from "info" to "warn"?

@@ -142,7 +142,7 @@ abort_if_negative_integer_argument (int arg, const char *arg_name, std::source_l
// of the calls present.
force_inline inline void pd_log_location (std::source_location sloc = std::source_location::current ()) noexcept
{
log_info_nocheck (LOG_DEFAULT, "loc: {}:{} ('{}')", sloc.file_name (), sloc.line (), sloc.function_name ());
log_warn (LOG_DEFAULT, "loc: {}:{} ('{}')", sloc.file_name (), sloc.line (), sloc.function_name ());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change from "info" to "warn"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log_info_nocheck_fmt caused the code to fail to compile and I didn't want to make the PR bigger than it needs to be. This is a debugging function not used anywhere in the code (I use it for logging locally sometimes), so log_warn works just as fine as log_info

@jonpryor jonpryor merged commit cc28c89 into main May 1, 2025
56 of 59 checks passed
@jonpryor jonpryor deleted the dev/grendel/std-format-fix branch May 1, 2025 15:18
@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants