Defines | |
| #define | XklDebug(level,...) _XklDebug( __FILE__, __func__, level, __VA_ARGS__ ) |
Typedefs | |
| typedef void(*) | XklLogAppender (const char file[], const char function[], int level, const char format[], va_list args) |
Functions | |
| const char * | XklGetLastError (void) |
| void | _XklDebug (const char file[], const char function[], int level, const char format[],...) |
| void | XklDefaultLogAppender (const char file[], const char function[], int level, const char format[], va_list args) |
| void | XklSetLogAppender (XklLogAppender fun) |
| void | XklSetDebugLevel (int level) |
| #define XklDebug | ( | level, | |||
| ... | ) | _XklDebug( __FILE__, __func__, level, __VA_ARGS__ ) |
| typedef void( *) XklLogAppender(const char file[], const char function[], int level, const char format[], va_list args) |
Custom log output method for _XklDebug. This appender is NOT called if the level of the message is greater than currently set debug level.
| file | is the name of the source file. Preprocessor symbol__FILE__ should be used here | |
| function | is a name of the function Preprocessor symbol__func__ should be used here | |
| level | is a level of the message | |
| format | is a format (like in printf) | |
| args | is the list of parameters |
| void _XklDebug | ( | const char | file[], | |
| const char | function[], | |||
| int | level, | |||
| const char | format[], | |||
| ... | ||||
| ) |
Output (optionally) some debug info
| file | is the name of the source file. Preprocessor symbol__FILE__ should be used here | |
| function | is a name of the function Preprocessor symbol__func__ should be used here | |
| level | is a level of the message | |
| format | is a format (like in printf) |
| void XklDefaultLogAppender | ( | const char | file[], | |
| const char | function[], | |||
| int | level, | |||
| const char | format[], | |||
| va_list | args | |||
| ) |
Default log output method. Sends everything to stdout.
| file | is the name of the source file. Preprocessor symbol__FILE__ should be used here | |
| function | is a name of the function Preprocessor symbol__func__ should be used here | |
| level | is a level of the message | |
| format | is a format (like in printf) | |
| args | is the list of parameters |
| const char* XklGetLastError | ( | void | ) |
| void XklSetDebugLevel | ( | int | level | ) |
Sets maximum debug level. Message of the level more than the one set here - will be ignored
| level | is a new debug level |
| void XklSetLogAppender | ( | XklLogAppender | fun | ) |
Installs the custom log appender.function
| fun | is the new log appender |
1.5.1