3 * @purpose Declaration of functions for printing log messages and/or terminating program after a fatal error
9 //To get around a 'pedantic' C99 rule that you must have at least 1 variadic arg, combine fmt into that.
10 #define Log(level, ...) LogEx(level, __func__, __VA_ARGS__)
11 #define Fatal(...) FatalEx(__func__, __VA_ARGS__)
13 // An enum to make the severity of log messages human readable in code
14 enum {LOGERR=0, LOGWARN=1, LOGNOTE=2, LOGINFO=3,LOGDEBUG=4};
16 extern void LogEx(int level, const char * funct, ...); // General function for printing log messages to stderr
17 extern void FatalEx(const char * funct, ...); // Function that deals with a fatal error (prints a message, then exits the program).