libmpd  11.8.17
Debug

Macros

#define debug_printf(dp, format, ARGS...)   debug_printf_real(dp,__FILE__,__LINE__,__FUNCTION__,format,##ARGS)
 

Typedefs

typedef enum _DebugLevel DebugLevel
 

Enumerations

enum  _DebugLevel { DEBUG_NO_OUTPUT = 0, DEBUG_ERROR = 1, DEBUG_WARNING = 2, DEBUG_INFO = 3 }
 

Functions

void debug_set_level (DebugLevel dl)
 
void debug_printf_real (DebugLevel dp, const char *file, const int line, const char *function, const char *format,...)
 
void debug_set_output (FILE *fp)
 

Detailed Description

Macro Definition Documentation

◆ debug_printf

#define debug_printf (   dp,
  format,
  ARGS... 
)    debug_printf_real(dp,__FILE__,__LINE__,__FUNCTION__,format,##ARGS)
Parameters
dpThe debug level the message is at.
formata printf style string
ARGSarguments for format

Definition at line 55 of file debug_printf.h.

Typedef Documentation

◆ DebugLevel

typedef enum _DebugLevel DebugLevel

Enumeration Type Documentation

◆ _DebugLevel

Enumerator
DEBUG_NO_OUTPUT 

No debug output

DEBUG_ERROR 

Print only error messages

DEBUG_WARNING 

Print Error and Warning messages

DEBUG_INFO 

Print only error message

Definition at line 29 of file debug_printf.h.

Function Documentation

◆ debug_printf_real()

void debug_printf_real ( DebugLevel  dp,
const char *  file,
const int  line,
const char *  function,
const char *  format,
  ... 
)

Internal function, do no use

◆ debug_set_level()

void debug_set_level ( DebugLevel  dl)
Parameters
dla DebugLevel

Set the debug level. if set to DEBUG_INFO everything is printed to stdout.

◆ debug_set_output()

void debug_set_output ( FILE *  fp)
Parameters
fpa #FILE

Redirect the output from stdout to fp. Set to NULL, to revert back to stdout.


Copyright 2006 Qball Cow