simplelogger_defs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SL_LogLocation
 Where the log message was generated from. More...
 

Macros

#define SL_LOGLEVEL_TO_STRING(stringPtr, level)
 

Typedefs

typedef 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. More...
 

Enumerations

enum  SL_LogLevel {
  SL_TRACE , SL_DEBUG , SL_INFO , SL_WARN ,
  SL_ERROR , SL_FATAL
}
 Level of the log message. More...
 

Macro Definition Documentation

◆ SL_LOGLEVEL_TO_STRING

#define SL_LOGLEVEL_TO_STRING (   stringPtr,
  level 
)
Value:
do{\
switch( level ){ \
case SL_TRACE: stringPtr = "TRACE"; break;\
case SL_DEBUG: stringPtr = "DEBUG"; break;\
case SL_INFO: stringPtr = "INFO"; break;\
case SL_WARN: stringPtr = "WARN"; break;\
case SL_ERROR: stringPtr = "ERROR"; break;\
case SL_FATAL: stringPtr = "FATAL"; break;\
default: stringPtr = "UNKN"; break;\
}}while(0)
@ 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

Typedef Documentation

◆ simplelogger_log_function

typedef 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.

Enumeration Type Documentation

◆ SL_LogLevel

Level of the log message.

Enumerator
SL_TRACE 
SL_DEBUG 
SL_INFO 
SL_WARN 
SL_ERROR 
SL_FATAL