This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
SoftwareRasterizer/include/vm/vm_log.h
Gered 648832d939 bit of src tree shuffling. main.cpp to be replaced with test programs
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
2015-01-11 22:52:55 -05:00

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