reactor-uc 0.1
Loading...
Searching...
No Matches
logging.h File Reference
#include <sys/types.h>
#include <inttypes.h>

Go to the source code of this file.

Macros

#define LF_LOG_LEVEL_OFF   0
 
#define LF_LOG_LEVEL_ERROR   1
 
#define LF_LOG_LEVEL_WARN   2
 
#define LF_LOG_LEVEL_INFO   3
 
#define LF_LOG_LEVEL_LOG   4
 
#define LF_LOG_LEVEL_DEBUG   5
 
#define LF_COLORIZE_LOGS   1
 
#define LF_TIMESTAMP_LOGS   1
 
#define LF_LOG_LEVEL_ALL   LF_LOG_LEVEL_DEBUG
 
#define LF_LOG_LEVEL_ENV   LF_LOG_LEVEL_ALL
 
#define LF_LOG_LEVEL_SCHED   LF_LOG_LEVEL_ALL
 
#define LF_LOG_LEVEL_QUEUE   LF_LOG_LEVEL_ALL
 
#define LF_LOG_LEVEL_FED   LF_LOG_LEVEL_ALL
 
#define LF_LOG_LEVEL_TRIG   LF_LOG_LEVEL_ALL
 
#define LF_LOG_LEVEL_PLATFORM   LF_LOG_LEVEL_ALL
 
#define LF_LOG_LEVEL_CONN   LF_LOG_LEVEL_ALL
 
#define LF_LOG_LEVEL_NET   LF_LOG_LEVEL_ALL
 
#define LF_LOG(level, module, fmt, ...)
 
#define LF_ERR(module, fmt, ...)
 
#define LF_WARN(module, fmt, ...)
 
#define LF_INFO(module, fmt, ...)
 
#define LF_DEBUG(module, fmt, ...)
 

Functions

void log_message (int level, const char *module, const char *fmt,...)
 

Macro Definition Documentation

◆ LF_COLORIZE_LOGS

#define LF_COLORIZE_LOGS   1

◆ LF_DEBUG

#define LF_DEBUG ( module,
fmt,
... )
Value:
LF_LOG(LF_LOG_LEVEL_DEBUG, module, fmt, ##__VA_ARGS__)
#define LF_LOG(level, module, fmt,...)
Definition logging.h:113
#define LF_LOG_LEVEL_DEBUG
Definition logging.h:12

◆ LF_ERR

#define LF_ERR ( module,
fmt,
... )
Value:
LF_LOG(LF_LOG_LEVEL_ERROR, module, fmt, ##__VA_ARGS__)
#define LF_LOG_LEVEL_ERROR
Definition logging.h:8

◆ LF_INFO

#define LF_INFO ( module,
fmt,
... )
Value:
LF_LOG(LF_LOG_LEVEL_INFO, module, fmt, ##__VA_ARGS__)
#define LF_LOG_LEVEL_INFO
Definition logging.h:10

◆ LF_LOG

#define LF_LOG ( level,
module,
fmt,
... )
Value:
do { \
if (level <= LF_LOG_LEVEL_##module) { \
log_message(level, #module, fmt, ##__VA_ARGS__); \
} \
} while (0)

◆ LF_LOG_LEVEL_ALL

#define LF_LOG_LEVEL_ALL   LF_LOG_LEVEL_DEBUG

◆ LF_LOG_LEVEL_CONN

#define LF_LOG_LEVEL_CONN   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_DEBUG

#define LF_LOG_LEVEL_DEBUG   5

◆ LF_LOG_LEVEL_ENV

#define LF_LOG_LEVEL_ENV   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_ERROR

#define LF_LOG_LEVEL_ERROR   1

◆ LF_LOG_LEVEL_FED

#define LF_LOG_LEVEL_FED   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_INFO

#define LF_LOG_LEVEL_INFO   3

◆ LF_LOG_LEVEL_LOG

#define LF_LOG_LEVEL_LOG   4

◆ LF_LOG_LEVEL_NET

#define LF_LOG_LEVEL_NET   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_OFF

#define LF_LOG_LEVEL_OFF   0

◆ LF_LOG_LEVEL_PLATFORM

#define LF_LOG_LEVEL_PLATFORM   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_QUEUE

#define LF_LOG_LEVEL_QUEUE   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_SCHED

#define LF_LOG_LEVEL_SCHED   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_TRIG

#define LF_LOG_LEVEL_TRIG   LF_LOG_LEVEL_ALL

◆ LF_LOG_LEVEL_WARN

#define LF_LOG_LEVEL_WARN   2

◆ LF_TIMESTAMP_LOGS

#define LF_TIMESTAMP_LOGS   1

◆ LF_WARN

#define LF_WARN ( module,
fmt,
... )
Value:
LF_LOG(LF_LOG_LEVEL_WARN, module, fmt, ##__VA_ARGS__)
#define LF_LOG_LEVEL_WARN
Definition logging.h:9

Function Documentation

◆ log_message()

void log_message ( int level,
const char * module,
const char * fmt,
... )