AWS IoT Device SDK C: Logging
Generate and print log messages
Return to main page ↑
IotLog_Generic

Generic logging function that prints a single message.

void IotLog_Generic( int32_t libraryLogSetting,
const char * const pLibraryName,
int32_t messageLevel,
const IotLogConfig_t * const pLogConfig,
const char * const pFormat,
... );

This function is the generic logging function shared across all libraries. The library-specific logging function IotLog is implemented using this function. Like IotLog, this function is only available when LIBRARY_LOG_LEVEL is IOT_LOG_NONE.

In most cases, the library-specific logging function IotLog should be called instead of this function.

Parameters
[in]libraryLogSettingThe log level setting of the library, used to determine if the log message should be printed. Must be one of the Log levels.
[in]pLibraryNameThe library name to print. See LIBRARY_LOG_NAME.
[in]messageLevelThe log level of the this message. See LIBRARY_LOG_LEVEL.
[in]pLogConfigPointer to a IotLogConfig_t. Optional; pass NULL to ignore.
[in]pFormatFormat string for the log message.
[in]...Arguments for format specification.
Returns
No return value. On errors, it prints nothing.