Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | MACRO_LOG_FUNC __func__ |
#define | RZ_DEFAULT_LOGLVL RZ_LOGLVL_ERROR |
#define | RZ_VLOG(lvl, tag, fmtstr, args) |
#define | RZ_LOG(lvl, tag, fmtstr, ...) |
#define | RZ_LOG_SILLY(fmtstr, ...) |
#define | RZ_LOG_DEBUG(fmtstr, ...) |
#define | RZ_LOG_VERBOSE(fmtstr, ...) |
#define | RZ_LOG_INFO(fmtstr, ...) |
#define | RZ_LOG_WARN(fmtstr, ...) |
#define | RZ_LOG_ERROR(fmtstr, ...) |
#define | RZ_LOG_FATAL(fmtstr, ...) |
Typedefs | |
typedef enum rz_log_level | RzLogLevel |
typedef void(* | RzLogCallback) (const char *output, const char *funcname, const char *filename, ut32 lineno, RzLogLevel level, const char *tag, const char *fmtstr,...) RZ_PRINTF_CHECK(7 |
Enumerations | |
enum | rz_log_level { RZ_LOGLVL_SILLY = 0 , RZ_LOGLVL_DEBUG = 1 , RZ_LOGLVL_VERBOSE = 2 , RZ_LOGLVL_INFO = 3 , RZ_LOGLVL_WARN = 4 , RZ_LOGLVL_ERROR = 5 , RZ_LOGLVL_FATAL = 6 , RZ_LOGLVL_NONE = 0xFF } |
Functions | |
RZ_API void | rz_log_set_level (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_colors) |
RZ_API void | rz_log_set_traplevel (RzLogLevel level) |
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_log (const char *funcname, const char *filename, ut32 lineno, RzLogLevel level, const char *tag, const char *fmtstr,...) RZ_PRINTF_CHECK(6 |
RZ_API void RZ_API void | rz_vlog (const char *funcname, const char *filename, ut32 lineno, RzLogLevel level, const char *tag, const char *fmtstr, va_list args) |
#define RZ_DEFAULT_LOGLVL RZ_LOGLVL_ERROR |
#define RZ_LOG | ( | lvl, | |
tag, | |||
fmtstr, | |||
... | |||
) |
#define RZ_LOG_ERROR | ( | fmtstr, | |
... | |||
) |
#define RZ_LOG_FATAL | ( | fmtstr, | |
... | |||
) |
#define RZ_LOG_INFO | ( | fmtstr, | |
... | |||
) |
#define RZ_LOG_VERBOSE | ( | fmtstr, | |
... | |||
) |
#define RZ_LOG_WARN | ( | fmtstr, | |
... | |||
) |
#define RZ_VLOG | ( | lvl, | |
tag, | |||
fmtstr, | |||
args | |||
) |
typedef enum rz_log_level RzLogLevel |
enum rz_log_level |
RZ_API void rz_log | ( | const char * | funcname, |
const char * | filename, | ||
ut32 | lineno, | ||
RzLogLevel | level, | ||
const char * | tag, | ||
const char * | fmtstr, | ||
... | |||
) |
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_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().