summaryrefslogtreecommitdiff
path: root/src/log.h
blob: 17170115916759ba9f365315fb999d6244a7a65f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <stdio.h>

#define dbg(format, ...) \
	dbgl(format "\n", ##  __VA_ARGS__)

#define dbgl(format, ...) \
	printf(format, ## __VA_ARGS__); \
	fflush(stderr)

#define err(format, ...) \
	printf(format "\n", ## __VA_ARGS__); \
	fflush(stderr)

#define fatal(format, ...) \
	printf(format "\n", ## __VA_ARGS__); \
	fflush(stderr); \
	abort()