-
Notifications
You must be signed in to change notification settings - Fork 3
Log.h
tiffany352 edited this page Jan 1, 2013
·
3 revisions
enum il_logLevel {
IL_COMMON_LOGFATAL = 0,
IL_COMMON_LOGERROR,
IL_COMMON_LOGWARNING,
IL_COMMON_LOGNOTICE,
IL_COMMON_LOGDEBUG,
IL_COMMON_LOGFLOOD
} il_loglevel;
Constants for defining the log level of messages and the maximum level of messages allowed through.
FILE *il_logfile;
The current file to be used for logging. Defaults to stdout.
#define il_loglevel_tostring(int level) ...
Converts a log level to a string representation.
#define il_prettifyFile(const char* name) ...
Trims off absolute path junk from FILE.
#define il_log(int level, const char *fmt, ...) ...
This function takes a log level, a format specifier, and arguments for a format function, and prints a corresponding message to the specified output file. They are in the form of file:line (func) level: message
.
Example: src/graphics/graphics.c:233 (draw) FLOOD: Rendering frame