OpFlex Framework
1.7.0
|
A log message handler for the OpFlex framework. More...
Macros | |
#define | LOG_TRACE 10 |
Trace log level. | |
#define | LOG_DEBUG4 20 |
Debug4 (lowest debug) log level. | |
#define | LOG_DEBUG3 30 |
Debug 3 log level. | |
#define | LOG_DEBUG2 40 |
Debug 2 log level. | |
#define | LOG_DEBUG1 50 |
Debug 1 (highest debug) log level. | |
#define | LOG_INFO 60 |
Info log level. | |
#define | LOG_WARNING 70 |
Warning log level. | |
#define | LOG_ERROR 80 |
Error log level. | |
#define | LOG_FATAL 90 |
Fatal log level. | |
Typedefs | |
typedef void(* | loghandler_p )(const char *file, int line, const char *function, int level, const char *message) |
Process a single log message. More... | |
Functions | |
ofstatus | ofloghandler_register (int level, loghandler_p handler) |
Register a new log handler. More... | |
A log message handler for the OpFlex framework.
You will need to create a log handler and register it if you want to want to log to your custom handler.
By default, the OpFlex Framework will simply log to standard out at INFO or above, but you can override this behavior by registering a customer log handler.
typedef void(* loghandler_p)(const char *file, int line, const char *function, int level, const char *message) |
Process a single log message.
This file is called synchronously from the thread that is doing the logging and is unsynchronized.
file | the file that performs the logging |
line | the line number for the log message |
function | the name of the function that's performing the logging |
level | the log level of the log message |
message | the formatted message to log |
ofstatus ofloghandler_register | ( | int | level, |
loghandler_p | handler | ||
) |
Register a new log handler.
level | the minimum log level for log messages that you want to recieve. |
handler | a function pointer to your handler function to be invoked when the listener is notified. |