Librería para enchufes en C.
1#include <stdio.h>
2#include <stdarg.h>
3
4void log_info(const char* format, ...) {
5 printf("[INFO]: ");
6
7 va_list list;
8 va_start(list, format);
9 vprintf(format, list);
10 va_end(list);
11}
12
13void log_error(const char* format, ...) {
14 fprintf(stderr, "[ERROR]: ");
15
16 va_list list;
17 va_start(list, format);
18 vfprintf(stderr, format, list);
19 va_end(list);
20}
21
22void log_warn(const char* format, ...) {
23 printf("[WARN]: ");
24
25 va_list list;
26 va_start(list, format);
27 vprintf(format, list);
28 va_end(list);
29}