zephyr/tests/subsys/logging/log_custom_header/prj.conf
Rob Barnes 61b5566e74 logging: Add an option for a custom log header
There are scenarios when it is necessary to globally redefine
a log macro. The existing logging frontend is not sufficient since
it redirects at the function level.

One example is using pigweed_tokenzier. The pigweed tokenizer depends
on intercepting log strings at the macro level to function.

Introduce an option to include a custom application provided header
named "zephyr_custom_log.h" at the end of log.h. This allows an
application to extend the LOG_* macros globally.

This change includes a simple test that redefines the core LOG macros
to include a custom prefix.

Signed-off-by: Rob Barnes <robbarnes@google.com>
2022-12-22 11:09:59 +01:00

9 lines
180 B
Plaintext

CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_LOG=y
CONFIG_LOG_OUTPUT=y
CONFIG_LOG_PRINTK=n
CONFIG_LOG_CUSTOM_HEADER=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG_FUNC_NAME_PREFIX_DBG=n