Wyatt Hepler | f9fb90f | 2020-09-30 18:59:33 -0700 | [diff] [blame] | 1 | .. _module-pw_assert_log: |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 2 | |
| 3 | ============= |
| 4 | pw_assert_log |
| 5 | ============= |
| 6 | |
| 7 | -------- |
| 8 | Overview |
| 9 | -------- |
| 10 | This assert backend implements the ``pw_assert`` facade, by routing the assert |
Ewout van Bekkum | 6f38a82 | 2021-07-08 13:57:32 -0700 | [diff] [blame] | 11 | message into the logger with the ``PW_LOG_LEVEL_FATAL`` log level. This is an |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 12 | easy way to tokenize your assert messages, by using the ``pw_log_tokenized`` |
| 13 | log backend for logging, then using ``pw_assert_log`` to route the tokenized |
| 14 | messages into the tokenized log handler. |
| 15 | |
| 16 | To use this module: |
| 17 | |
| 18 | 1. Set your assert backend: ``pw_assert_BACKEND = dir_pw_assert_log`` |
| 19 | 2. Ensure your logging backend knows how to handle the assert failure flag |