You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
492 B

#ifndef LOGGER_H
#define LOGGER_H
#include <string>
enum ELogLevel {
LFATAL = 0,
LERROR,
LWARNING,
LNOTICE,
LDEBUG
};
void _log(int level, const char *trace, const char *format, ...);
#define fatal(...) _log(LFATAL, NULL, ## __VA_ARGS__)
#define error(...) _log(LERROR, NULL, ## __VA_ARGS__)
#define warning(...) _log(LWARNING, NULL, ## __VA_ARGS__)
#define debug(...) _log(LDEBUG, NULL, ## __VA_ARGS__)
#define notice(...) _log(LNOTICE, NULL, ## __VA_ARGS__)
#endif