Go to the source code of this file.
|
void | lis_set_log_callbacks (const struct lis_log_callbacks *callbacks) |
| register callbacks that will be used to get back messages. Only one set of callbacks can be registered at one time. Calling this function will unset previously set callbacks. By default, all log messages go to stderr.
|
|
void | lis_log (enum lis_log_level lvl, const char *file, int line, const char *func, const char *fmt,...) |
|
void | lis_log_raw (enum lis_log_level lvl, const char *msg) |
|
void | lis_log_reset (void) |
|
◆ lis_log_debug
#define lis_log_debug |
( |
| ... | ) |
|
Value:
void lis_log(enum lis_log_level lvl, const char *file, int line, const char *func, const char *fmt,...)
Definition at line 45 of file log.h.
◆ lis_log_error
#define lis_log_error |
( |
| ... | ) |
|
Value:
Definition at line 48 of file log.h.
◆ lis_log_info
#define lis_log_info |
( |
| ... | ) |
|
Value:
Definition at line 46 of file log.h.
◆ lis_log_warning
#define lis_log_warning |
( |
| ... | ) |
|
Value:
Definition at line 47 of file log.h.
◆ lis_log_callback
typedef void lis_log_callback(enum lis_log_level lvl, const char *msg) |
log callback
- Parameters
-
[in] | msg | does no include "\n". |
Definition at line 18 of file log.h.
◆ lis_log_level
Enumerator |
---|
LIS_LOG_LVL_MIN | |
LIS_LOG_LVL_DEBUG | |
LIS_LOG_LVL_INFO | |
LIS_LOG_LVL_WARNING | |
LIS_LOG_LVL_ERROR | |
LIS_LOG_LVL_MAX | |
Definition at line 4 of file log.h.
◆ lis_log()
void lis_log |
( |
enum lis_log_level | lvl, |
|
|
const char * | file, |
|
|
int | line, |
|
|
const char * | func, |
|
|
const char * | fmt, |
|
|
| ... ) |
|
extern |
◆ lis_log_raw()
◆ lis_log_reset()
void lis_log_reset |
( |
void | | ) |
|
|
extern |
◆ lis_set_log_callbacks()
register callbacks that will be used to get back messages. Only one set of callbacks can be registered at one time. Calling this function will unset previously set callbacks. By default, all log messages go to stderr.
- Parameters
-
[in] | callbacks | callback to use. Pointer must remain valid until lis_set_log_callbacks is called again. NULL will reset callbacks to their default (stderr). |
◆ lis_log_stderr
default log callback provided for convenience. Will log to stderr.
Definition at line 59 of file log.h.
◆ lis_log_stdout
default log callback provided for convenience. Will log to stdout.
Definition at line 66 of file log.h.