2020-10-01 01:59:33 +00:00
|
|
|
.. _module-pw_assert_log:
|
2020-08-14 23:46:50 +00:00
|
|
|
|
|
|
|
=============
|
|
|
|
pw_assert_log
|
|
|
|
=============
|
|
|
|
|
|
|
|
--------
|
|
|
|
Overview
|
|
|
|
--------
|
|
|
|
This assert backend implements the ``pw_assert`` facade, by routing the assert
|
2021-07-08 20:57:32 +00:00
|
|
|
message into the logger with the ``PW_LOG_LEVEL_FATAL`` log level. This is an
|
2020-08-14 23:46:50 +00:00
|
|
|
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
|