log subsystem APIs need to be clearly namespaced as public or private #19497
Labels
area: Logging
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Stale
The expectation is that the naming of functions, macros, and globals for logging follow the Zephyr coding standard that private APIs are prefixed with "z_".
Hence I would expect that symbols or macros starting with "log_" are public, and private stuff would be prefixed with "z_log_". However this appears to be inconsistently done. There are a lot of things which are scoped public but appear to be private, some examples would be log_N(), log_printf_arg_checker(), log_generic_from_user(), many macros, the list goes on.
There are also some private macros which are prefixed with
_
or__
in violation of our coding standard, these should start withZ_
.Because of this, it's not clear what the public surface of logging is, it's clearly not everything that begins with log_, and we need to re-namespace the internal stuff to clearly indicate it is private. Among other things this will make maintenance easier since we will not have to treat the private stuff as contracts that have to go through the deprecation process if we need to change them.
Overall, I think we need something like:
The text was updated successfully, but these errors were encountered: