blob: 626e28b660d14d1fca1a3bfb3dfd48ce894434ba [file] [log] [blame]
Wyatt Heplerf9fb90f2020-09-30 18:59:33 -07001.. _module-pw_assert_log:
Keir Mierleb776cb22020-08-14 16:46:50 -07002
3=============
4pw_assert_log
5=============
6
7--------
8Overview
9--------
10This assert backend implements the ``pw_assert`` facade, by routing the assert
Ewout van Bekkum6f38a822021-07-08 13:57:32 -070011message into the logger with the ``PW_LOG_LEVEL_FATAL`` log level. This is an
Keir Mierleb776cb22020-08-14 16:46:50 -070012easy way to tokenize your assert messages, by using the ``pw_log_tokenized``
13log backend for logging, then using ``pw_assert_log`` to route the tokenized
14messages into the tokenized log handler.
15
16To use this module:
17
181. Set your assert backend: ``pw_assert_BACKEND = dir_pw_assert_log``
192. Ensure your logging backend knows how to handle the assert failure flag