aboutsummaryrefslogtreecommitdiff
path: root/src/logger.h
blob: 99b7b04303550d886da68d849341e4d7acfceead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef LOGGER_H
#define LOGGER_H

#include <stdio.h>

enum log_levels {
	LOG_ERROR,
	LOG_INFO,
	LOG_DEBUG,
	LOG_INSANEDEBUG,
};

#define LOG(LEVEL, args...) do { \
	if (LEVEL <= LOG_LEVEL) { \
		fprintf(LOG_FP, args); \
	} \
} while (0)

#endif