summary refs log tree commit diff
path: root/logging.h
blob: 6ad57295c9a443e8a6e6a3b2c56d8823bb248333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdarg.h>
#include <unistd.h>

static void
aura_printf(const char *fmt, ...)
{
	va_list args = { 0 };

	printf("[%d] ", getpid());
	va_start(args, fmt);
	vprintf(fmt, args);
	va_end(args);

	return;
}

static void
aura_fprintf(FILE *stream, const char *fmt, ...)
{
	va_list args = { 0 };

	fprintf(stream, "[%d] ", getpid());
	va_start(args, fmt);
	vfprintf(stream, fmt, args);
	va_end(args);

	return;
}