Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | LOG_CONFIGSTR_SIZE 512 |
#define | LOG_OUTPUTBUF_SIZE 512 |
Functions | |
RZ_API void | rz_log_set_level (RzLogLevel level) |
RZ_API void | rz_log_set_traplevel (RzLogLevel level) |
RZ_API void | rz_log_set_file (const char *filename) |
RZ_API void | rz_log_set_srcinfo (bool show_info) |
RZ_API void | rz_log_set_colors (bool show_info) |
RZ_API void | rz_log_add_callback (RzLogCallback cbfunc) |
Add a logging callback. More... | |
RZ_API void | rz_log_del_callback (RzLogCallback cbfunc) |
Remove a logging callback. More... | |
RZ_API void | rz_vlog (const char *funcname, const char *filename, ut32 lineno, RzLogLevel level, const char *tag, const char *fmtstr, va_list args) |
RZ_API void | rz_log (const char *funcname, const char *filename, ut32 lineno, RzLogLevel level, const char *tag, const char *fmtstr,...) |
Internal logging function used by preprocessor macros. More... | |
Variables | |
static RzList * | log_cbs = NULL |
static int | cfg_loglvl = RZ_LOGLVL_WARN |
static int | cfg_logtraplvl = RZ_LOGLVL_FATAL |
static bool | cfg_logsrcinfo = false |
static bool | cfg_logcolors = false |
static char | cfg_logfile [LOG_CONFIGSTR_SIZE] = "" |
static const char * | level_tags [] |
RZ_API void rz_log | ( | const char * | funcname, |
const char * | filename, | ||
ut32 | lineno, | ||
RzLogLevel | level, | ||
const char * | tag, | ||
const char * | fmtstr, | ||
... | |||
) |
Internal logging function used by preprocessor macros.
funcname | Contains the function name of the calling function |
filename | Contains the filename that funcname is defined in |
lineno | The line number that this log call is being made from in filename |
lvl | Logging level for output |
fmtstr | A printf like string |
This function is used by the RZ_LOG_* preprocessor macros for logging
Definition at line 143 of file log.c.
References args, level, rz_vlog(), and test-lz4-versions::tag.
RZ_API void rz_log_add_callback | ( | RzLogCallback | cbfunc | ) |
Add a logging callback.
cbfunc | RzLogCallback style function to be called |
Definition at line 54 of file log.c.
References log_cbs, rz_list_append(), rz_list_contains(), and rz_list_new().
RZ_API void rz_log_del_callback | ( | RzLogCallback | cbfunc | ) |
Remove a logging callback.
cbfunc | RzLogCallback style function to be called |
Definition at line 67 of file log.c.
References log_cbs, and rz_list_delete_data().
Definition at line 46 of file log.c.
References cfg_logcolors.
Referenced by cb_log_config_colors().
Definition at line 37 of file log.c.
References cfg_logfile, LOG_CONFIGSTR_SIZE, and rz_str_nlen().
Referenced by cb_log_config_file().
RZ_API void rz_log_set_level | ( | RzLogLevel | level | ) |
Definition at line 29 of file log.c.
References cfg_loglvl, and level.
Referenced by cb_log_config_level().
Definition at line 42 of file log.c.
References cfg_logsrcinfo.
Referenced by cb_log_config_srcinfo().
RZ_API void rz_log_set_traplevel | ( | RzLogLevel | level | ) |
Definition at line 33 of file log.c.
References cfg_logtraplvl, and level.
Referenced by cb_log_config_traplevel().
RZ_API void rz_vlog | ( | const char * | funcname, |
const char * | filename, | ||
ut32 | lineno, | ||
RzLogLevel | level, | ||
const char * | tag, | ||
const char * | fmtstr, | ||
va_list | args | ||
) |
Definition at line 73 of file log.c.
References args, cb, cfg_logfile, cfg_loglvl, cfg_logsrcinfo, cfg_logtraplvl, eprintf, benchmark::FILE, level, level_tags, log_cbs, LOG_OUTPUTBUF_SIZE, MACRO_LOG_FUNC, NULL, RZ_ARRAY_SIZE, RZ_BETWEEN, rz_list_length(), RZ_LOGLVL_NONE, rz_sys_breakpoint, rz_sys_fopen(), snprintf, test-lz4-versions::tag, and vsnprintf.
Referenced by rz_log().
Definition at line 16 of file log.c.
Referenced by rz_log_set_colors().
|
static |
Definition at line 17 of file log.c.
Referenced by rz_log_set_file(), and rz_vlog().
|
static |
Definition at line 13 of file log.c.
Referenced by rz_log_set_level(), and rz_vlog().
Definition at line 15 of file log.c.
Referenced by rz_log_set_srcinfo(), and rz_vlog().
|
static |
Definition at line 14 of file log.c.
Referenced by rz_log_set_traplevel(), and rz_vlog().
|
static |
Definition at line 18 of file log.c.
Referenced by rz_vlog().
Definition at line 12 of file log.c.
Referenced by rz_log_add_callback(), rz_log_del_callback(), and rz_vlog().