| Liboil Reference Manual | ||||
|---|---|---|---|---|
void (*OilDebugPrintFunc) (int level, const char *file, const char *func, int line, const char *format, va_list varargs); enum OilDebugLevel; void oil_debug_set_print_function (OilDebugPrintFunc func); int oil_debug_get_level (void); void oil_debug_set_level (int level); #define OIL_ERROR (...) #define OIL_WARNING (...) #define OIL_INFO (...) #define OIL_DEBUG (...) #define OIL_LOG (...) #define OIL_FUNCTION #define OIL_DEBUG_PRINT (level, ...)
void (*OilDebugPrintFunc) (int level, const char *file, const char *func, int line, const char *format, va_list varargs);
Typedef describing functions that can be registered using oil_debug_set_print_function() so that it is called to print debugging messages.
| level : | the debug level |
| file : | name of the file where the debug message occurs |
| func : | name of the function where the debug message occurs |
| line : | line in the file where the debug message occurs |
| format : | a printf format |
| varargs : | varargs for the printf format |
typedef enum {
OIL_DEBUG_NONE = 0,
OIL_DEBUG_ERROR,
OIL_DEBUG_WARNING,
OIL_DEBUG_INFO,
OIL_DEBUG_DEBUG,
OIL_DEBUG_LOG
} OilDebugLevel;
Enumeration describing debug levels in Liboil.
void oil_debug_set_print_function (OilDebugPrintFunc func);
Sets the function to call when outputting debugging information. A value of NULL for func will restore the default handler, which prints debugging information to stderr.
| func : |
int oil_debug_get_level (void);
Gets the current debug level.
| Returns : | the current debug level |
void oil_debug_set_level (int level);
Sets the current debug level.
| level : | the new debug level |
#define OIL_ERROR(...) OIL_DEBUG_PRINT(OIL_DEBUG_ERROR, __VA_ARGS__)
Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_ERROR.
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : |
#define OIL_WARNING(...) OIL_DEBUG_PRINT(OIL_DEBUG_WARNING, __VA_ARGS__)
Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_WARNING.
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : |
#define OIL_INFO(...) OIL_DEBUG_PRINT(OIL_DEBUG_INFO, __VA_ARGS__)
Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_INFO.
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : |
#define OIL_DEBUG(...) OIL_DEBUG_PRINT(OIL_DEBUG_DEBUG, __VA_ARGS__)
Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_DEBUG.
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : |
#define OIL_LOG(...) OIL_DEBUG_PRINT(OIL_DEBUG_LOG, __VA_ARGS__)
Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_LOG.
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : | |
| ... : |
#define OIL_FUNCTION
Internal macro that points to __PRETTY_FUNCTION__ or __func__ if the former is not available.