1.. _module-pw_log_zephyr: 2 3================ 4pw_log_zephyr 5================ 6 7-------- 8Overview 9-------- 10This interrupt backend implements the ``pw_log`` facade. To enable, set 11``CONFIG_PIGWEED_LOG=y``. After that, logging can be controlled via the standard 12`Kconfig options <https://docs.zephyrproject.org/latest/reference/logging/index.html#global-kconfig-options>`_. 13All logs made through `PW_LOG_*` are logged to the Zephyr logging module 14``pigweed``. 15 16Setting the log level 17--------------------- 18In order to remain compatible with existing Pigweed code, the logging backend 19respects ``PW_LOG_LEVEL``. If set, the backend will translate the Pigweed log 20levels to their closest Zephyr counterparts: 21 22+---------------------------+-------------------+ 23| Pigweed | Zephyr | 24+===========================+===================+ 25| ``PW_LOG_LEVEL_DEBUG`` | ``LOG_LEVEL_DBG`` | 26+---------------------------+-------------------+ 27| ``PW_LOG_LEVEL_INFO`` | ``LOG_LEVEL_INF`` | 28+---------------------------+-------------------+ 29| ``PW_LOG_LEVEL_WARN`` | ``LOG_LEVEL_WRN`` | 30+---------------------------+-------------------+ 31| ``PW_LOG_LEVEL_ERROR`` | ``LOG_LEVEL_ERR`` | 32| | | 33| ``PW_LOG_LEVEL_CRITICAL`` | | 34| | | 35| ``PW_LOG_LEVEL_FATAL`` | | 36+---------------------------+-------------------+ 37 38Alternatively, it is also possible to set the Zephyr logging level directly via 39``CONFIG_PIGWEED_LOG_LEVEL``. 40