-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
HEXDUMP log gives warning when logging function name. #26170
Comments
Unfortunately, it is hexdump limitation that it cannot have function prefix. Added clarification to kconfig and doc. |
The limitation is fine, but then it should perhaps be "legal" for the application to log the function name (even as a literal string rather than |
Solutions for this issue has been discussed in #26178 |
Reopening as enhancement as per this comment |
Describe the bug
At least for
BT_HEXDUMP_DBG
the log statement does not include the function name, and if you add the function name as part of the string supplied by the caller, then this warning:WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'my_func', this function's name, in a string
appears. Since it's not possible add formatting to HEX_DUMP log strings (without additional steps), this warning cannot easily be dealt with.To Reproduce
Create a function that logs it's own name using e.g.
BT_HEXDUMP_DBG
:Log should be something like
Expected behavior
That either there is no warning, or that the log statement automatically includes the function name (similar to
BT_DBG
).Impact
Very low as it is just a warning.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: