aboutsummaryrefslogtreecommitdiff
path: root/src/log.c
blob: 078afdea284d7fa492966689a81e5d937d0f8121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#include <stdarg.h>
#include <stdio.h>

#include "globs.h"
#include "log.h"

#define X(n, N)                                                                \
	void log_##n(const char *format, ...) {                                    \
		va_list args;                                                          \
		va_start(args, format);                                                \
		eprintf(PKGIT_PREFIX_##N);                                             \
		vfprintf(stderr, format, args);                                        \
		eprintf("\n");                                                         \
		va_end(args);                                                          \
	}

LOG_FUNCTIONS
#undef X