properly propogate errors

This commit is contained in:
Conor Patrick
2018-05-14 22:55:47 -04:00
parent 00248f4c98
commit 4dd6eea8e0
5 changed files with 262 additions and 145 deletions

23
log.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef _LOG_H
#define _LOG_H
#define DEBUG_LEVEL 1
#define ENABLE_FILE_LOGGING
void LOG(const char * tag, int num, const char * fmt, ...);
#if DEBUG_LEVEL == 1
#define printf1 printf
#define printf2(fmt, ...) LOG(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
#define printf3(fmt, ...) LOG(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
#else
#define printf1(fmt, ...)
#define printf2(fmt, ...)
#define printf3(fmt, ...)
#endif
#endif