Examples for using loggers.
Examples for using loggers.
#define ITEM dc_log_file
#define ITEM_DELETE dc_log_file_delete
#define NAME logger_vec
DC_SCOPED(logger_vec) loggers = logger_vec_new(stdalloc_get_ref());
for (int i = 1; i <= 5; i++) {
logger_vec_push(&loggers, logger);
}
}
}
}
}
new_global)((
NS(
DC_LOGGER, global_config)){.stream = stdout, .ansi_colours =
true},
return 0;
}
#define DC_DEBUG(DEBUG_FN, DEBUG_PTR)
static DC_PUBLIC void dc_log_file_debug(dc_log_file const *self, dc_debug_fmt fmt, FILE *stream)
static DC_PUBLIC void dc_log_file_set_filter(dc_log_file *self, dc_log_level level)
struct _dc_log_file dc_log_file
#define DC_FOR(TYPE, INSTANCE, ITER, ITEM)
static void example_1(dc_log_file *parent)
static void example_4(dc_log_file *parent)
static void example_2(dc_log_file *parent)
static void example_3(dc_log_file *parent)
#define DC_SCOPED(type,...)
RAII in C. Call the destructor when the variable goes out of scope.
#define DC_LOGGER_NEW(...)