|
libei 1.6.0
A library for Emulated Input
|
The API to control logging output. More...
Typedefs | |
| typedef void(* | ei_log_handler) (struct ei *ei, enum ei_log_priority priority, const char *message, struct ei_log_context *context) |
| The log handler for library logging. | |
Enumerations | |
| enum | ei_log_priority { EI_LOG_PRIORITY_DEBUG , EI_LOG_PRIORITY_INFO , EI_LOG_PRIORITY_WARNING , EI_LOG_PRIORITY_ERROR } |
Functions | |
| unsigned int | ei_log_context_get_line (struct ei_log_context *ctx) |
| const char * | ei_log_context_get_file (struct ei_log_context *ctx) |
| const char * | ei_log_context_get_func (struct ei_log_context *ctx) |
| void | ei_log_set_handler (struct ei *ei, ei_log_handler log_handler) |
| Change the log handler for this context. | |
| void | ei_log_set_priority (struct ei *ei, enum ei_log_priority priority) |
| enum ei_log_priority | ei_log_get_priority (const struct ei *ei) |
The API to control logging output.
| typedef void(* ei_log_handler) (struct ei *ei, enum ei_log_priority priority, const char *message, struct ei_log_context *context) |
The log handler for library logging.
This handler is only called for messages with a log level equal or greater than than the one set in ei_log_set_priority().
The context passed to this function contains auxiliary information about this log message such as the line number, file name and function name this message occurred in. The log context is valid only within the current invocation of the log handler.
| ei | The EI context |
| priority | The log priority |
| message | The log message as a null-terminated string |
| context | A log message context for this message |
| enum ei_log_priority |
| const char * ei_log_context_get_file | ( | struct ei_log_context * | ctx | ) |
| const char * ei_log_context_get_func | ( | struct ei_log_context * | ctx | ) |
| unsigned int ei_log_context_get_line | ( | struct ei_log_context * | ctx | ) |
| enum ei_log_priority ei_log_get_priority | ( | const struct ei * | ei | ) |
| void ei_log_set_handler | ( | struct ei * | ei, |
| ei_log_handler | log_handler ) |
Change the log handler for this context.
If the log handler is NULL, the built-in default log function is used.
| ei | The EI context |
| log_handler | The log handler or NULL to use the default log handler. |
| void ei_log_set_priority | ( | struct ei * | ei, |
| enum ei_log_priority | priority ) |