aboutsummaryrefslogtreecommitdiff
path: root/pw_assert_log/docs.rst
blob: 626e28b660d14d1fca1a3bfb3dfd48ce894434ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.. _module-pw_assert_log:

=============
pw_assert_log
=============

--------
Overview
--------
This assert backend implements the ``pw_assert`` facade, by routing the assert
message into the logger with the ``PW_LOG_LEVEL_FATAL`` log level. This is an
easy way to tokenize your assert messages, by using the ``pw_log_tokenized``
log backend for logging, then using ``pw_assert_log`` to route the tokenized
messages into the tokenized log handler.

To use this module:

1. Set your assert backend: ``pw_assert_BACKEND = dir_pw_assert_log``
2. Ensure your logging backend knows how to handle the assert failure flag