blob: 012e1c896c223d14bedd988934f094de087d18aa [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
11message into the logger with the ``PW_LOG_ASSERT_FAILED`` flag set. This is an
12easy 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