|
RAVE
|
Defines the functions for debugging rave. More...
Go to the source code of this file.
Macros | |
| #define | RAVE_SPEWDEBUG0(msg) |
| Spewdebug macro taking one text string. | |
| #define | RAVE_SPEWDEBUG1(msg, arg1) |
| Spewdebug macro taking one text string and one argument. | |
| #define | RAVE_SPEWDEBUG2(msg, arg1, arg2) |
| Spewdebug macro taking one text string and two arguments. | |
| #define | RAVE_SPEWDEBUG3(msg, arg1, arg2, arg3) |
| Spewdebug macro taking one text string and three arguments. | |
| #define | RAVE_SPEWDEBUG4(msg, arg1, arg2, arg3, arg4) |
| Spewdebug macro taking one text string and four arguments. | |
| #define | RAVE_DEBUG0(msg) |
| Debug macro taking one text string. | |
| #define | RAVE_DEBUG1(msg, arg1) |
| Debug macro taking one text string and one argument. | |
| #define | RAVE_DEBUG2(msg, arg1, arg2) |
| Debug macro taking one text string and two arguments. | |
| #define | RAVE_DEBUG3(msg, arg1, arg2, arg3) |
| Debug macro taking one text string and three arguments. | |
| #define | RAVE_DEBUG4(msg, arg1, arg2, arg3, arg4) |
| Debug macro taking one text string and four arguments. | |
| #define | RAVE_DEBUG7(msg, arg1, arg2, arg3, arg4, arg5, arg6, arg7) |
| Debug macro taking one text string and seven arguments. | |
| #define | RAVE_DEPRECATED0(msg) |
| Deprecated macro taking one text string. | |
| #define | RAVE_DEPRECATED1(msg, arg1) |
| Deprecated macro taking one text string and one argument. | |
| #define | RAVE_DEPRECATED2(msg, arg1, arg2) |
| Deprecated macro taking one text string and two arguments. | |
| #define | RAVE_DEPRECATED3(msg, arg1, arg2, arg3) |
| Deprecated macro taking one text string and three arguments. | |
| #define | RAVE_DEPRECATED4(msg, arg1, arg2, arg3, arg4) |
| Deprecated macro taking one text string and four arguments. | |
| #define | RAVE_INFO0(msg) |
| Info macro taking one text string. | |
| #define | RAVE_INFO1(msg, arg1) |
| Info macro taking one text string and one argument. | |
| #define | RAVE_INFO2(msg, arg1, arg2) |
| Info macro taking one text string and two arguments. | |
| #define | RAVE_INFO3(msg, arg1, arg2, arg3) |
| Info macro taking one text string and three arguments. | |
| #define | RAVE_INFO4(msg, arg1, arg2, arg3, arg4) |
| Info macro taking one text string and four arguments. | |
| #define | RAVE_INFO7(msg, arg1, arg2, arg3, arg4, arg5, arg6, arg7) |
| Info macro taking one text string and seven arguments. | |
| #define | RAVE_WARNING0(msg) |
| Warning macro taking one text string. | |
| #define | RAVE_WARNING1(msg, arg1) |
| Warning macro taking one text string and one argument. | |
| #define | RAVE_WARNING2(msg, arg1, arg2) |
| Warning macro taking one text string and two arguments. | |
| #define | RAVE_WARNING3(msg, arg1, arg2, arg3) |
| Warning macro taking one text string and three arguments. | |
| #define | RAVE_WARNING4(msg, arg1, arg2, arg3, arg4) |
| Warning macro taking one text string and four arguments. | |
| #define | RAVE_ERROR0(msg) |
| Error macro taking one text string. | |
| #define | RAVE_ERROR1(msg, arg1) |
| Error macro taking one text string and one argument. | |
| #define | RAVE_ERROR2(msg, arg1, arg2) |
| Error macro taking one text string and two arguments. | |
| #define | RAVE_ERROR3(msg, arg1, arg2, arg3) |
| Error macro taking one text string and three arguments. | |
| #define | RAVE_ERROR4(msg, arg1, arg2, arg3, arg4) |
| Error macro taking one text string and four arguments. | |
| #define | RAVE_ERROR5(msg, arg1, arg2, arg3, arg4, arg5) |
| #define | RAVE_CRITICAL0(msg) |
| Critical macro taking one text string. | |
| #define | RAVE_CRITICAL1(msg, arg1) |
| Critical macro taking one text string and one argument. | |
| #define | RAVE_CRITICAL2(msg, arg1, arg2) |
| Critical macro taking one text string and two arguments. | |
| #define | RAVE_CRITICAL3(msg, arg1, arg2, arg3) |
| Critical macro taking one text string and three arguments. | |
| #define | RAVE_CRITICAL4(msg, arg1, arg2, arg3, arg4) |
| Critical macro taking one text string and four arguments. | |
| #define | RAVE_ASSERT(expr, msg) |
| #define | RAVE_ABORT() |
Typedefs | |
| typedef enum Rave_Debug | Rave_Debug |
| Debug levels. | |
| typedef enum Rave_LogOutput | Rave_LogOutput |
| Where the default debug function should route its printouts. | |
| typedef void(*) | rave_dbgfun(const char *filename, int lineno, Rave_Debug lvl, const char *fmt,...) |
| The debugger function. | |
Enumerations | |
| enum | Rave_Debug { RAVE_SPEWDEBUG =0 , RAVE_DEBUG , RAVE_DEPRECATED , RAVE_INFO , RAVE_WARNING , RAVE_ERROR , RAVE_CRITICAL , RAVE_SILENT } |
| Debug levels. More... | |
| enum | Rave_LogOutput { RAVE_LOG_OUTPUT_STDERR =0 , RAVE_LOG_OUTPUT_FILE , RAVE_LOG_OUTPUT_SYSLOG } |
| Where the default debug function should route its printouts. More... | |
Functions | |
| void | Rave_printf (const char *fmt,...) |
| The printer function. | |
| void | Rave_initializeDebugger (void) |
| Initializes the debugger structure, must have been called before executing the code. | |
| void | Rave_setDebugLevel (Rave_Debug lvl) |
| Sets the debug level. | |
| Rave_Debug | Rave_getDebugLevel (void) |
| void | Rave_setLogLevel (const char *lvl) |
| Sets the log level. | |
| const char * | Rave_getLogLevel (void) |
| void | Rave_setDebugFunction (rave_dbgfun dbgfun) |
| Sets the debug function where the debug printouts should be routed. | |
| rave_dbgfun | Rave_getDebugFunction (void) |
| void | Rave_setLogOutputStderr (void) |
| Sets the default debug function's printouts to use stderr. | |
| int | Rave_setLogOutputFile (const char *filename) |
| Sets the default debug function's printouts to use a log file. | |
| void | Rave_setLogOutputSyslog (const char *logid, const char *facility) |
| Sets the default debug function's printouts to use syslog. | |
| Rave_LogOutput | Rave_getLogOutput (void) |
Defines the functions for debugging rave.
| #define RAVE_ABORT | ( | ) |
| #define RAVE_ASSERT | ( | expr, | |
| msg ) |
| #define RAVE_CRITICAL0 | ( | msg | ) |
Critical macro taking one text string.
| #define RAVE_CRITICAL1 | ( | msg, | |
| arg1 ) |
Critical macro taking one text string and one argument.
| #define RAVE_CRITICAL2 | ( | msg, | |
| arg1, | |||
| arg2 ) |
Critical macro taking one text string and two arguments.
| #define RAVE_CRITICAL3 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3 ) |
Critical macro taking one text string and three arguments.
| #define RAVE_CRITICAL4 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4 ) |
Critical macro taking one text string and four arguments.
| #define RAVE_DEBUG0 | ( | msg | ) |
Debug macro taking one text string.
| #define RAVE_DEBUG1 | ( | msg, | |
| arg1 ) |
Debug macro taking one text string and one argument.
| #define RAVE_DEBUG2 | ( | msg, | |
| arg1, | |||
| arg2 ) |
Debug macro taking one text string and two arguments.
| #define RAVE_DEBUG3 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3 ) |
Debug macro taking one text string and three arguments.
| #define RAVE_DEBUG4 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4 ) |
Debug macro taking one text string and four arguments.
| #define RAVE_DEBUG7 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4, | |||
| arg5, | |||
| arg6, | |||
| arg7 ) |
Debug macro taking one text string and seven arguments.
| #define RAVE_DEPRECATED0 | ( | msg | ) |
Deprecated macro taking one text string.
| #define RAVE_DEPRECATED1 | ( | msg, | |
| arg1 ) |
Deprecated macro taking one text string and one argument.
| #define RAVE_DEPRECATED2 | ( | msg, | |
| arg1, | |||
| arg2 ) |
Deprecated macro taking one text string and two arguments.
| #define RAVE_DEPRECATED3 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3 ) |
Deprecated macro taking one text string and three arguments.
| #define RAVE_DEPRECATED4 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4 ) |
Deprecated macro taking one text string and four arguments.
| #define RAVE_ERROR0 | ( | msg | ) |
Error macro taking one text string.
| #define RAVE_ERROR1 | ( | msg, | |
| arg1 ) |
Error macro taking one text string and one argument.
| #define RAVE_ERROR2 | ( | msg, | |
| arg1, | |||
| arg2 ) |
Error macro taking one text string and two arguments.
| #define RAVE_ERROR3 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3 ) |
Error macro taking one text string and three arguments.
| #define RAVE_ERROR4 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4 ) |
Error macro taking one text string and four arguments.
| #define RAVE_ERROR5 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4, | |||
| arg5 ) |
| #define RAVE_INFO0 | ( | msg | ) |
| #define RAVE_INFO1 | ( | msg, | |
| arg1 ) |
Info macro taking one text string and one argument.
| #define RAVE_INFO2 | ( | msg, | |
| arg1, | |||
| arg2 ) |
Info macro taking one text string and two arguments.
| #define RAVE_INFO3 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3 ) |
Info macro taking one text string and three arguments.
| #define RAVE_INFO4 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4 ) |
Info macro taking one text string and four arguments.
| #define RAVE_INFO7 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4, | |||
| arg5, | |||
| arg6, | |||
| arg7 ) |
Info macro taking one text string and seven arguments.
| #define RAVE_SPEWDEBUG0 | ( | msg | ) |
Spewdebug macro taking one text string.
| #define RAVE_SPEWDEBUG1 | ( | msg, | |
| arg1 ) |
Spewdebug macro taking one text string and one argument.
| #define RAVE_SPEWDEBUG2 | ( | msg, | |
| arg1, | |||
| arg2 ) |
Spewdebug macro taking one text string and two arguments.
| #define RAVE_SPEWDEBUG3 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3 ) |
Spewdebug macro taking one text string and three arguments.
| #define RAVE_SPEWDEBUG4 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4 ) |
Spewdebug macro taking one text string and four arguments.
| #define RAVE_WARNING0 | ( | msg | ) |
Warning macro taking one text string.
| #define RAVE_WARNING1 | ( | msg, | |
| arg1 ) |
Warning macro taking one text string and one argument.
| #define RAVE_WARNING2 | ( | msg, | |
| arg1, | |||
| arg2 ) |
Warning macro taking one text string and two arguments.
| #define RAVE_WARNING3 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3 ) |
Warning macro taking one text string and three arguments.
| #define RAVE_WARNING4 | ( | msg, | |
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4 ) |
Warning macro taking one text string and four arguments.
| typedef void(*) rave_dbgfun(const char *filename, int lineno, Rave_Debug lvl, const char *fmt,...) |
The debugger function.
| [in] | filename | - the name of the file |
| [in] | lineno | - the line number |
| [in] | lvl | - the debug level for this message |
| [in] | fmt | - the varargs formatter string |
| [in] | ... | - the varargs list |
| typedef enum Rave_Debug Rave_Debug |
Debug levels.
The levels are defined so that if RAVE_INFO debug level is turned on, all higher levels will also be printed except RAVE_SILENT which means turn of logging.
| typedef enum Rave_LogOutput Rave_LogOutput |
Where the default debug function should route its printouts.
| enum Rave_Debug |
Debug levels.
The levels are defined so that if RAVE_INFO debug level is turned on, all higher levels will also be printed except RAVE_SILENT which means turn of logging.
| enum Rave_LogOutput |
Where the default debug function should route its printouts.
| Enumerator | |
|---|---|
| RAVE_LOG_OUTPUT_STDERR | Printouts go to stderr. This is the default. |
| RAVE_LOG_OUTPUT_FILE | Printouts go to a log file, see Rave_setLogOutputFile. |
| RAVE_LOG_OUTPUT_SYSLOG | Printouts go to syslog, see Rave_setLogOutputSyslog. |
| rave_dbgfun Rave_getDebugFunction | ( | void | ) |
| Rave_Debug Rave_getDebugLevel | ( | void | ) |
| const char * Rave_getLogLevel | ( | void | ) |
| Rave_LogOutput Rave_getLogOutput | ( | void | ) |
| void Rave_initializeDebugger | ( | void | ) |
Initializes the debugger structure, must have been called before executing the code.
| void Rave_printf | ( | const char * | fmt, |
| ... ) |
The printer function.
| [in] | fmt | - the varargs formatter string |
| [in] | ... | - the varargs list |
| void Rave_setDebugFunction | ( | rave_dbgfun | dbgfun | ) |
Sets the debug function where the debug printouts should be routed.
| [in] | rave_dbgfun | The debug function. |
| void Rave_setDebugLevel | ( | Rave_Debug | lvl | ) |
Sets the debug level.
| [in] | lvl | the debug level. See Rave_Debug. |
| void Rave_setLogLevel | ( | const char * | lvl | ) |
Sets the log level.
Must be one of spewdebug, debug, deprecated, info, warning, error, critical and silent. If string not can be identified, it falls back to silent
| [in] | lvl | the log level. |
| int Rave_setLogOutputFile | ( | const char * | filename | ) |
Sets the default debug function's printouts to use a log file.
The file is opened for appending (O_APPEND) and kept open, which makes it safe to call this once in a parent process before forking off.
| [in] | filename | - the name of the file to log to |
| void Rave_setLogOutputStderr | ( | void | ) |
Sets the default debug function's printouts to use stderr.
This is the default behaviour.
| void Rave_setLogOutputSyslog | ( | const char * | logid, |
| const char * | facility ) |
Sets the default debug function's printouts to use syslog.
| [in] | logid | - identity prefixed onto every syslog message (the openlog ident), e.g. "PGF[rave.baltrad.eu]". If NULL, "rave" is used. |
| [in] | facility | - the syslog facility to log with, as a name: "user", or "local0".."local7". Case-insensitive; Default fallback is user if not reckognized |