Go to the source code of this file.
◆ ITEM
Definition at line 9 of file log.c.
◆ ITEM_DELETE
Definition at line 10 of file log.c.
◆ NAME
Definition at line 11 of file log.c.
◆ example_1()
- Examples
- utils/log.c.
Definition at line 14 of file log.c.
14 {
16
17 DC_SCOPED(logger_vec) loggers = logger_vec_new(stdalloc_get_ref());
18
19 for (int i = 1; i <= 5; i++) {
21 logger_vec_push(&loggers, logger);
22 }
23
25}
struct _dc_log_file dc_log_file
#define DC_FOR(TYPE, INSTANCE, ITER, ITEM)
#define DC_SCOPED(type,...)
RAII in C. Call the destructor when the variable goes out of scope.
#define DC_LOGGER_NEW(...)
◆ example_2()
- Examples
- utils/log.c.
Definition at line 27 of file log.c.
27 {
29
32
36}
#define DC_DEBUG(DEBUG_FN, DEBUG_PTR)
static DC_PUBLIC void dc_log_file_set_filter(dc_log_file *self, dc_log_level level)
◆ example_3()
- Examples
- utils/log.c.
Definition at line 38 of file log.c.
38 {
43
45}
static DC_PUBLIC void dc_log_file_debug(dc_log_file const *self, dc_debug_fmt fmt, FILE *stream)
◆ example_4()
◆ main()
Definition at line 59 of file log.c.
59 {
62 new_global)((
NS(
DC_LOGGER, global_config)){.stream = stdout, .ansi_colours =
true},
65
70 return 0;
71}
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)