AWS IoT Device SDK C:
Logging
Generate and print log messages
|
Return to main page ↑ |
Logging function for a specific library. In most cases, this is the logging function to call.
This function prints a single log message. It is available when LIBRARY_LOG_LEVEL is not IOT_LOG_NONE. Log messages automatically include the log level, library name, and time. An optional IotLogConfig_t may be passed to this function to hide information for a single log message.
The logging library must be set up before this function may be called. See Setup and use for more information.
This logging function also has the following abbreviated forms that can be used when an IotLogConfig_t isn't needed.
Name | Equivalent to |
---|---|
IotLogError | IotLog( IOT_LOG_ERROR, NULL, ... ) |
IotLogWarn | IotLog( IOT_LOG_WARN, NULL, ... ) |
IotLogInfo | IotLog( IOT_LOG_INFO, NULL, ... ) |
IotLogDebug | IotLog( IOT_LOG_DEBUG, NULL, ... ) |
[in] | messageLevel | Log level of this message. Must be one of the Log levels. |
[in] | pLogConfig | Pointer to an IotLogConfig_t. Optional; pass NULL to ignore. |
[in] | ... | Message and format specification. |