DDraceNetwork Docs
log.h File Reference
#include <cstdarg>
#include <cstdint>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LOG_COLOR
 

Macros

#define GNUC_ATTRIBUTE(x)
 
#define log_error(sys, ...)   log_log(LEVEL_ERROR, sys, __VA_ARGS__)
 
#define log_warn(sys, ...)   log_log(LEVEL_WARN, sys, __VA_ARGS__)
 
#define log_info(sys, ...)   log_log(LEVEL_INFO, sys, __VA_ARGS__)
 
#define log_debug(sys, ...)   log_log(LEVEL_DEBUG, sys, __VA_ARGS__)
 
#define log_trace(sys, ...)   log_log(LEVEL_TRACE, sys, __VA_ARGS__)
 
#define log_error_color(color, sys, ...)   log_log_color(LEVEL_ERROR, color, sys, __VA_ARGS__)
 
#define log_warn_color(color, sys, ...)   log_log_color(LEVEL_WARN, color, sys, __VA_ARGS__)
 
#define log_info_color(color, sys, ...)   log_log_color(LEVEL_INFO, color, sys, __VA_ARGS__)
 
#define log_debug_color(color, sys, ...)   log_log_color(LEVEL_DEBUG, color, sys, __VA_ARGS__)
 
#define log_trace_color(color, sys, ...)   log_log_color(LEVEL_TRACE, color, sys, __VA_ARGS__)
 

Enumerations

enum  LEVEL : char {
  LEVEL_ERROR , LEVEL_WARN , LEVEL_INFO , LEVEL_DEBUG ,
  LEVEL_TRACE
}
 

Functions

void log_log (LEVEL level, const char *sys, const char *fmt,...)
 
void log_log_color (LEVEL level, LOG_COLOR color, const char *sys, const char *fmt,...)
 
void log_log_v (LEVEL level, const char *sys, const char *fmt, va_list args)
 
void log_log_color_v (LEVEL level, LOG_COLOR color, const char *sys, const char *fmt, va_list args)
 

Macro Definition Documentation

◆ GNUC_ATTRIBUTE

#define GNUC_ATTRIBUTE (   x)

◆ log_debug

#define log_debug (   sys,
  ... 
)    log_log(LEVEL_DEBUG, sys, __VA_ARGS__)

◆ log_debug_color

#define log_debug_color (   color,
  sys,
  ... 
)    log_log_color(LEVEL_DEBUG, color, sys, __VA_ARGS__)

◆ log_error

#define log_error (   sys,
  ... 
)    log_log(LEVEL_ERROR, sys, __VA_ARGS__)

◆ log_error_color

#define log_error_color (   color,
  sys,
  ... 
)    log_log_color(LEVEL_ERROR, color, sys, __VA_ARGS__)

◆ log_info

#define log_info (   sys,
  ... 
)    log_log(LEVEL_INFO, sys, __VA_ARGS__)

◆ log_info_color

#define log_info_color (   color,
  sys,
  ... 
)    log_log_color(LEVEL_INFO, color, sys, __VA_ARGS__)

◆ log_trace

#define log_trace (   sys,
  ... 
)    log_log(LEVEL_TRACE, sys, __VA_ARGS__)

◆ log_trace_color

#define log_trace_color (   color,
  sys,
  ... 
)    log_log_color(LEVEL_TRACE, color, sys, __VA_ARGS__)

◆ log_warn

#define log_warn (   sys,
  ... 
)    log_log(LEVEL_WARN, sys, __VA_ARGS__)

◆ log_warn_color

#define log_warn_color (   color,
  sys,
  ... 
)    log_log_color(LEVEL_WARN, color, sys, __VA_ARGS__)

Enumeration Type Documentation

◆ LEVEL

enum LEVEL : char
Enumerator
LEVEL_ERROR 
LEVEL_WARN 
LEVEL_INFO 
LEVEL_DEBUG 
LEVEL_TRACE