aboutsummaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
new file mode 100644
index 0000000..078afde
--- /dev/null
+++ b/src/log.c
@@ -0,0 +1,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