qh_log_ex()

Updated: April 19, 2023

Log a formatted message

Synopsis:

#include <qh/log.h>
int qh_log_ex(const qh_log_info_t *log_info,
              const char *fmt,
              ...)

Arguments:

log_info
The log information structure to use with this log message, or NULL to use default values.
fmt
A string that specifies the format of the output. The formatting string determines the additional arguments you need to provide. For more information, see printf().

Library:

qh

Description:

This function logs a formatted message to the set of active destinations. It includes the severity level set in the log information structure (log_info).

In most cases, call logging is done using the QNX helpers logging macros (which in turn call qh_log_ex()) because they greatly simplify the calls, but you can also use this function directly.

Although QNX does not recommend it, if it's absolutely necessary, it is safe to call this function with log_info set to NULL, which specifies the default log information and context configuration.

Returns:

EOK on success or a standard errno on failure. errno is unmodified.