Working on linux now, better logging
This commit is contained in:
@@ -28,6 +28,7 @@ inline std::string basedir(const std::string &path)
|
||||
|
||||
int logLevel();
|
||||
void setLogLevel(int l);
|
||||
void logElapsed();
|
||||
const char *logIndicator(int l);
|
||||
|
||||
#define LOG_ERROR 1
|
||||
@@ -35,7 +36,7 @@ const char *logIndicator(int l);
|
||||
#define LOG_INFO 3
|
||||
#define LOG_DEBUG 4
|
||||
|
||||
#define MKLOGSTMT(level, code) if (logLevel() >= level) { fprintf(stderr, "%s: ", logIndicator(level));code;fflush(stderr); }
|
||||
#define MKLOGSTMT(level, code) if (logLevel() >= level) { fprintf(stderr, "%s: ", logIndicator(level));logElapsed();code;fflush(stderr); }
|
||||
#define MKL0(level, msg) MKLOGSTMT(level, fprintf(stderr, msg))
|
||||
#define MKL1(level, msg, a) MKLOGSTMT(level, fprintf(stderr, msg, a))
|
||||
#define MKL2(level, msg, a, b) MKLOGSTMT(level, fprintf(stderr, msg, a, b))
|
||||
|
||||
Reference in New Issue
Block a user