Logging API Reference
Generate and print log messages
|
Generate and print log messages.
This library allows other libraries to generate and print log messages, which can aid in debugging. Log messages are printed by passing strings to one of the logging functions. The features of this library include:
How to set up and use the logging library.
The file iot_logging_setup.h should be included to configure logging for a single source file. Before including iot_logging_setup.h, the constants LIBRARY_LOG_LEVEL and LIBRARY_LOG_NAME must be defined.
For example, to configure all the "SAMPLE" library to print all messages below the info log level:
The code above will print something like the following: