11 #ifndef SIMPLELOGGER_DEFS_H
12 #define SIMPLELOGGER_DEFS_H
41 const char* log_string );
44 #define SL_LOGLEVEL_TO_STRING( stringPtr, level ) do{\
46 case SL_TRACE: stringPtr = "TRACE"; break;\
47 case SL_DEBUG: stringPtr = "DEBUG"; break;\
48 case SL_INFO: stringPtr = "INFO"; break;\
49 case SL_WARN: stringPtr = "WARN"; break;\
50 case SL_ERROR: stringPtr = "ERROR"; break;\
51 case SL_FATAL: stringPtr = "FATAL"; break;\
52 default: stringPtr = "UNKN"; break;\
void(* simplelogger_log_function)(const char *logger_name, const struct SL_LogLocation *location, const enum SL_LogLevel level, const char *log_string)
Pointer to a function that does the actual log operation.
Definition: simplelogger_defs.h:38
SL_LogLevel
Level of the log message.
Definition: simplelogger_defs.h:26
@ SL_INFO
Definition: simplelogger_defs.h:29
@ SL_ERROR
Definition: simplelogger_defs.h:31
@ SL_TRACE
Definition: simplelogger_defs.h:27
@ SL_FATAL
Definition: simplelogger_defs.h:32
@ SL_WARN
Definition: simplelogger_defs.h:30
@ SL_DEBUG
Definition: simplelogger_defs.h:28
Where the log message was generated from.
Definition: simplelogger_defs.h:17
int line_number
Definition: simplelogger_defs.h:18
const char * file
Definition: simplelogger_defs.h:20