You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For some use cases, it is helpful to support alternative string formatting function calls. For example, when dealing with logging in other programming languages (e.g. Rust).
Describe the solution you'd like
Support an additional field in e.g. struct log_source_const_data (or perhaps somewhere else that is more appropriate) that allows users to specify a function pointer to a custom string-formatting function.
For traditional logging, this could just be left as NULL for the default behaviour (or populated, if that is preferred).
If the function pointer is non-NULL, the log core would use the provided print formatter instead of the default.
Use of this feature could be gated via Kconfig.
It would be great if this could be declared via LOG_MODULE_REGISTER().
Want to bump this feature request -- it would be very helpful for a project I am working on that takes the logs from zephyr and processes them using an existing program that prefers a specific log format that differs from zephyr's format.
Is your feature request related to a problem? Please describe.
For some use cases, it is helpful to support alternative string formatting function calls. For example, when dealing with logging in other programming languages (e.g. Rust).
Describe the solution you'd like
Support an additional field in e.g.
struct log_source_const_data
(or perhaps somewhere else that is more appropriate) that allows users to specify a function pointer to a custom string-formatting function.For traditional logging, this could just be left as
NULL
for the default behaviour (or populated, if that is preferred).If the function pointer is non-
NULL
, the log core would use the provided print formatter instead of the default.Use of this feature could be gated via
Kconfig
.It would be great if this could be declared via
LOG_MODULE_REGISTER()
.Describe alternatives you've considered
Additional context
Related RFC #65837
The text was updated successfully, but these errors were encountered: