Gered
648832d939
full disclosure: i'm a bit unsure of what is the best way to do this at this point in time. the end goal with this project is that it becomes a library to be used by other apps (of course), but need tests to test various library functionality. unsure how best to organize this with cmake (and since i'm using clion, i kind of would prefer it works nicely and integrated with the ide...). i figure this is going to be a trial and error approach that will evolve over the next while
25 lines
491 B
C
25 lines
491 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "vm/vm_stdinc.h"
|
|
|
|
void log_init();
|
|
void log_end();
|
|
void log_write(const char *tag, const char *format, ...);
|
|
|
|
#define LOG_INFO(...) (log_write("INFO", __VA_ARGS__))
|
|
#define LOG_WARN(...) (log_write("WARN", __VA_ARGS__))
|
|
#define LOG_ERROR(...) (log_write("ERROR", __VA_ARGS__))
|
|
#ifdef DEBUG
|
|
#define LOG_DEBUG(...) (log_write("DEBUG", __VA_ARGS__))
|
|
#else
|
|
#define LOG_DEBUG(...)
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|