The API to control logging output.
◆ eis_log_handler
typedef void(* eis_log_handler) (struct eis *eis, enum eis_log_priority priority, const char *message, struct eis_log_context *ctx) |
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 eis_log_set_priority().
- Parameters
-
eis | The EIs context |
priority | The log priority |
message | The log message as a null-terminated string |
ctx | A log message context for this message |
◆ eis_log_priority
Enumerator |
---|
EIS_LOG_PRIORITY_DEBUG | |
EIS_LOG_PRIORITY_INFO | |
EIS_LOG_PRIORITY_WARNING | |
EIS_LOG_PRIORITY_ERROR | |
◆ eis_log_context_get_file()
const char * eis_log_context_get_file |
( |
struct eis_log_context * | ctx | ) |
|
- Returns
- the file name (
__FILE__
) for a given log message context.
◆ eis_log_context_get_func()
const char * eis_log_context_get_func |
( |
struct eis_log_context * | ctx | ) |
|
- Returns
- the function name (
__func__
) for a given log message context.
◆ eis_log_context_get_line()
unsigned int eis_log_context_get_line |
( |
struct eis_log_context * | ctx | ) |
|
- Returns
- the line number (
__LINE__
) for a given log message context.
◆ eis_log_get_priority()
◆ eis_log_set_handler()
Change the log handler for this context.
If the log handler is NULL, the built-in default log function is used.
- Parameters
-
eis | The EIS context |
log_handler | The log handler or NULL to use the default log handler. |
◆ eis_log_set_priority()