RENEWLab  1.1.0
RENEW project
logger.h File Reference

Logging macros that can be optimized out by the compiler. More...

#include <ctime>
#include <string>
Include dependency graph for logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MLPD_LOG_LEVEL_OFF   0
 
#define MLPD_LOG_LEVEL_ERROR   1
 
#define MLPD_LOG_LEVEL_WARN   2
 
#define MLPD_LOG_LEVEL_INFO   3
 
#define MLPD_LOG_LEVEL_FRAME   4
 
#define MLPD_LOG_LEVEL_SYMBOL   5
 
#define MLPD_LOG_LEVEL_TRACE   6
 
#define MLPD_LOG_DEFAULT_STREAM   stdout
 
#define mlpd_trace_file_or_default_stream   MLPD_LOG_DEFAULT_STREAM
 
#define MLPD_LOG_LEVEL   MLPD_LOG_LEVEL_TRACE
 
#define MLPD_ERROR(...)
 
#define MLPD_WARN(...)
 
#define MLPD_INFO(...)
 
#define MLPD_FRAME(...)
 
#define MLPD_SYMBOL(...)
 
#define MLPD_TRACE(...)
 

Functions

static std::string mlpd_get_formatted_time ()
 Return decent-precision time formatted as seconds:microseconds. More...
 
static void mlpd_output_log_header (FILE *stream, int level)
 
static bool is_log_level_reasonable ()
 

Detailed Description

Logging macros that can be optimized out by the compiler.

Author
Hideaki, modified by Anuj

Macro Definition Documentation

◆ MLPD_ERROR

#define MLPD_ERROR (   ...)

◆ MLPD_FRAME

◆ MLPD_INFO

#define MLPD_INFO (   ...)

◆ MLPD_LOG_DEFAULT_STREAM

#define MLPD_LOG_DEFAULT_STREAM   stdout

◆ MLPD_LOG_LEVEL

#define MLPD_LOG_LEVEL   MLPD_LOG_LEVEL_TRACE

◆ MLPD_LOG_LEVEL_ERROR

#define MLPD_LOG_LEVEL_ERROR   1

◆ MLPD_LOG_LEVEL_FRAME

#define MLPD_LOG_LEVEL_FRAME   4

◆ MLPD_LOG_LEVEL_INFO

#define MLPD_LOG_LEVEL_INFO   3

◆ MLPD_LOG_LEVEL_OFF

#define MLPD_LOG_LEVEL_OFF   0

◆ MLPD_LOG_LEVEL_SYMBOL

#define MLPD_LOG_LEVEL_SYMBOL   5

◆ MLPD_LOG_LEVEL_TRACE

#define MLPD_LOG_LEVEL_TRACE   6

◆ MLPD_LOG_LEVEL_WARN

#define MLPD_LOG_LEVEL_WARN   2

◆ MLPD_SYMBOL

◆ MLPD_TRACE

◆ mlpd_trace_file_or_default_stream

#define mlpd_trace_file_or_default_stream   MLPD_LOG_DEFAULT_STREAM

◆ MLPD_WARN

#define MLPD_WARN (   ...)

Function Documentation

◆ is_log_level_reasonable()

static bool is_log_level_reasonable ( )
inlinestatic

Return true if the logging verbosity is reasonable for non-developer users of Agora

◆ mlpd_get_formatted_time()

static std::string mlpd_get_formatted_time ( )
static

Return decent-precision time formatted as seconds:microseconds.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mlpd_output_log_header()

static void mlpd_output_log_header ( FILE *  stream,
int  level 
)
inlinestatic
Here is the call graph for this function:
MLPD_LOG_LEVEL_FRAME
#define MLPD_LOG_LEVEL_FRAME
Definition: logger.h:30
mlpd_trace_file_or_default_stream
#define mlpd_trace_file_or_default_stream
Definition: logger.h:41
MLPD_LOG_DEFAULT_STREAM
#define MLPD_LOG_DEFAULT_STREAM
Definition: logger.h:34
MLPD_LOG_LEVEL_WARN
#define MLPD_LOG_LEVEL_WARN
Definition: logger.h:28
MLPD_LOG_LEVEL_SYMBOL
#define MLPD_LOG_LEVEL_SYMBOL
Definition: logger.h:31
mlpd_output_log_header
static void mlpd_output_log_header(FILE *stream, int level)
Definition: logger.h:119
MLPD_LOG_LEVEL_ERROR
#define MLPD_LOG_LEVEL_ERROR
Definition: logger.h:27
MLPD_LOG_LEVEL_TRACE
#define MLPD_LOG_LEVEL_TRACE
Definition: logger.h:32
MLPD_LOG_LEVEL_INFO
#define MLPD_LOG_LEVEL_INFO
Definition: logger.h:29