5 #define LOG_CONFIGSTR_SIZE 512
6 #define LOG_OUTPUTBUF_SIZE 512
76 va_copy(args_copy,
args);
107 fprintf(stderr,
"%s", output_buf);
118 fprintf(
file,
"%s", output_buf);
147 va_start(
args, fmtstr);
RZ_API RZ_BORROW RzListIter * rz_list_contains(RZ_NONNULL const RzList *list, RZ_NONNULL const void *ptr)
Returns the RzListIter of the given pointer, if found.
RZ_API bool rz_list_delete_data(RZ_NONNULL RzList *list, void *ptr)
Deletes an entry in the list by searching for a pointer.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_log_set_file(const char *filename)
RZ_API void rz_log_set_level(RzLogLevel level)
RZ_API void rz_log_set_traplevel(RzLogLevel level)
static char cfg_logfile[LOG_CONFIGSTR_SIZE]
static bool cfg_logsrcinfo
static const char * level_tags[]
RZ_API void rz_log_set_colors(bool show_info)
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.
#define LOG_OUTPUTBUF_SIZE
RZ_API void rz_log_del_callback(RzLogCallback cbfunc)
Remove a logging callback.
static bool cfg_logcolors
RZ_API void rz_log_set_srcinfo(bool show_info)
RZ_API void rz_log_add_callback(RzLogCallback cbfunc)
Add a logging callback.
#define LOG_CONFIGSTR_SIZE
static int cfg_logtraplvl
RZ_API void rz_vlog(const char *funcname, const char *filename, ut32 lineno, RzLogLevel level, const char *tag, const char *fmtstr, va_list args)
enum rz_log_level RzLogLevel
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
RZ_API size_t rz_str_nlen(const char *s, size_t n)
#define rz_sys_breakpoint()
RZ_API FILE * rz_sys_fopen(const char *path, const char *mode)
#define RZ_BETWEEN(x, y, z)