The FreeRTOS libraries use the following logging macros, listed in increasing order of verbosity.
LogError
LogWarn
LogInfo
LogDebug
A definition for all the macros must be provided. The recommendations are:
- Macros should support
C89
style logging. - Logging should be thread safe. Log lines from multiple tasks must not interleave with each other.
- Logging APIs must not block, and must free application tasks from blocking on I/O.
Refer to the Logging Functionality on FreeRTOS.org for implementation specifics. You can see an implementation in this example.
- Run a test with multiple tasks to verify logs do not interleave.
- Run a test to verify that the logging APIs do not block on I/O.
- Test logging macros with various standards, such as
C89,C99
style logging. - Test logging macros by setting different log levels, such as
Debug
,Info
,Error
, andWarning
.