libcdio
2.1.0
|
Header to control logging and level of detail of output. More...
#include <cdio/types.h>
Go to the source code of this file.
Typedefs | |
typedef void(* | cdio_log_handler_t) (cdio_log_level_t level, const char message[]) |
Enumerations | |
enum | cdio_log_level_t { CDIO_LOG_DEBUG = 1, CDIO_LOG_INFO, CDIO_LOG_WARN, CDIO_LOG_ERROR, CDIO_LOG_ASSERT } |
Functions | |
void | cdio_default_log_handler (cdio_log_level_t level, const char message[]) |
cdio_log_handler_t | cdio_log_set_handler (cdio_log_handler_t new_handler) |
void | cdio_log (cdio_log_level_t level, const char format[],...) GNUC_PRINTF(2 |
void void | cdio_debug (const char format[],...) GNUC_PRINTF(1 |
void void void | cdio_info (const char format[],...) GNUC_PRINTF(1 |
void void void void | cdio_warn (const char format[],...) GNUC_PRINTF(1 |
void void void void void | cdio_error (const char format[],...) GNUC_PRINTF(1 |
Variables | |
cdio_log_level_t | cdio_loglevel_default |
Header to control logging and level of detail of output.
typedef void(* cdio_log_handler_t) (cdio_log_level_t level, const char message[]) |
This type defines the signature of a log handler. For every message being logged, the handler will receive the log level and the message string.
level | The log level. |
message | The log message. |
enum cdio_log_level_t |
The different log levels supported.
void void cdio_debug | ( | const char | format[], |
... | |||
) |
Handle a debugging message.
void cdio_default_log_handler | ( | cdio_log_level_t | level, |
const char | message[] | ||
) |
The initial or default log handler in effect.
level | The log level. |
message | The log message. |
void void void void void cdio_error | ( | const char | format[], |
... | |||
) |
Handle an error message. Execution is terminated.
void void void cdio_info | ( | const char | format[], |
... | |||
) |
Handle an informative message.
void cdio_log | ( | cdio_log_level_t | level, |
const char | format[], | ||
... | |||
) |
Handle an message with the given log level.
level | The log level. |
format | printf-style format string |
... | remaining arguments needed by format string |
cdio_log_handler_t cdio_log_set_handler | ( | cdio_log_handler_t | new_handler | ) |
Set a custom log handler for libcdio. The return value is the log handler being replaced. If the provided parameter is NULL, then the handler will be reset to the default handler.
new_handler | The new log handler. |
void void void void cdio_warn | ( | const char | format[], |
... | |||
) |
Handle a warning message.
cdio_log_level_t cdio_loglevel_default |
The place to save the preference concerning how much verbosity is desired. This is used by the internal default log handler, but it could be use by applications which provide their own log handler.