AWS IoT Device SDK C:
Logging
Generate and print log messages
|
Return to main page ↑ |
Log the contents of buffer as bytes. Only available when LIBRARY_LOG_LEVEL is IOT_LOG_DEBUG.
This function prints the bytes located at a given memory address. It is intended for debugging only, and is therefore only available when LIBRARY_LOG_LEVEL is IOT_LOG_DEBUG.
Log messages printed by this function always include the log level, library name, and time. In addition, this function may print an optional header pHeader
before it prints the contents of the buffer. This function does not have an IotLogConfig_t parameter.
The logging library must be set up before this function may be called. See Setup and use for more information.
[in] | pHeader | A message to log before the buffer. Optional; pass NULL to ignore. |
[in] | pBuffer | Pointer to start of buffer. |
[in] | bufferSize | Size of pBuffer . |
Example
The code above prints something like the following: