Argus PEP client API
2.3
|
Sets PEP client log levels and log output. More...
Macros | |
#define | PEP_LOGLEVEL_DEBUG 3 |
Logs ERROR, WARN, INFO and DEBUG messages. More... | |
#define | PEP_LOGLEVEL_ERROR 0 |
Logs only ERROR messages. More... | |
#define | PEP_LOGLEVEL_INFO 2 |
Logs ERROR, WARN and INFO messages. More... | |
#define | PEP_LOGLEVEL_NONE -1 |
No logging at all. More... | |
#define | PEP_LOGLEVEL_WARN 1 |
Logs ERROR and WARN messages. More... | |
Typedefs | |
typedef int | pep_log_handler_callback (int level, const char *format, va_list args) |
Optional log handler function callback prototype. More... | |
Sets PEP client log levels and log output.
By default the log level is PEP_LOGLEVEL_NONE and the log output is NULL, therefore, the PEP client doesn't log anything.
See Error Reporting for example how to handle error in your code.
Example to debug in a log file:
#define PEP_LOGLEVEL_DEBUG 3 |
Logs ERROR, WARN, INFO and DEBUG messages.
#define PEP_LOGLEVEL_ERROR 0 |
Logs only ERROR messages.
#define PEP_LOGLEVEL_INFO 2 |
Logs ERROR, WARN and INFO messages.
#define PEP_LOGLEVEL_NONE -1 |
No logging at all.
#define PEP_LOGLEVEL_WARN 1 |
Logs ERROR and WARN messages.
typedef int pep_log_handler_callback(int level, const char *format, va_list args) |
Optional log handler function callback prototype.
You can implement your own callback function to replace the default log handler. The PEP log message are not terminated with a "\n".
level | The log level to log |
format | The format string |
args | The variable arguments list |
Example to use your own logging callback function: