dmi_log
Synopsis
#include <opendmi/context.h>
bool dmi_log(dmi_context_t *context, dmi_log_level_t level,
const char *format, ...);
Description
The dmi_log function writes a message, formatted the way printf(3)
formats its arguments, to the handler of the context, see
dmi_set_logger.
The message is dropped if its level is less severe than the level of the
context, see dmi_set_log_level, or if the context has no handler. The
handler may drop it by a level of its own.
Levels are ordered from the most severe one to the least: DMI_LOG_ERROR,
DMI_LOG_WARNING, DMI_LOG_NOTICE, DMI_LOG_INFO and DMI_LOG_DEBUG.
The functions of the library write their messages this way, and so may the extensions and the applications using the context.
The macros dmi_log_error, dmi_log_warning, dmi_log_notice,
dmi_log_info and dmi_log_debug write a message of the level they are
named after, and take the same arguments but the level.