logging.h File Reference

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

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


Detailed Description

Header to control logging and level of detail of output.


Typedef Documentation

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.

See also:
cdio_log_set_handler

cdio_log_level_t

Parameters:
level The log level.
message The log message.


Enumeration Type Documentation

enum cdio_log_level_t
 

The different log levels supported.

Enumerator:
CDIO_LOG_DEBUG  Debug-level messages - helps debug what's up.
CDIO_LOG_INFO  Informational - indicates perhaps something of interest.
CDIO_LOG_WARN  Warning conditions - something that looks funny.
CDIO_LOG_ERROR  Error conditions - may terminate program.
CDIO_LOG_ASSERT  Critical conditions - may abort program.


Function Documentation

void void cdio_debug const char  format[],
  ...
 

Handle a debugging message.

See also:
cdio_log for a more generic routine

void void void void void cdio_error const char  format[],
  ...
 

Handle an error message. Execution is terminated.

See also:
cdio_log for a more generic routine.

void void void cdio_info const char  format[],
  ...
 

Handle an informative message.

See also:
cdio_log for a more generic routine

void cdio_log cdio_log_level_t  level,
const char  format[],
  ...
 

Handle an message with the given log level.

See also:
cdio_debug

cdio_info

cdio_warn

cdio_error

Parameters:
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.

See also:
cdio_log_handler_t
Parameters:
new_handler The new log handler.
Returns:
The previous log handler.

void void void void cdio_warn const char  format[],
  ...
 

Handle a warning message.

See also:
cdio_log for a more generic routine


Variable Documentation

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.


Generated on Fri Oct 27 06:38:09 2006 for libcdio by  doxygen 1.4.6