DDraceNetwork Documentation
Loading...
Searching...
No Matches
log.cpp File Reference
#include "color.h"
#include "logger.h"
#include "system.h"
#include "windows.h"
#include <atomic>
#include <cstdio>
#include <memory>
#include <unistd.h>
Include dependency graph for log.cpp:

Classes

class  CLoggerCollection
class  CLoggerAsync
class  CLoggerNoOp

Functions

void log_set_global_logger (ILogger *logger)
void log_global_logger_finish ()
void log_set_global_logger_default ()
ILoggerlog_get_scope_logger ()
void log_set_scope_logger (ILogger *logger)
static void log_log_impl (LEVEL level, bool have_color, LOG_COLOR color, const char *sys, const char *fmt, va_list args)
void log_log_v (LEVEL level, const char *sys, const char *fmt, va_list args)
void log_log (LEVEL level, const char *sys, const char *fmt,...)
void log_log_color_v (LEVEL level, LOG_COLOR color, const char *sys, const char *fmt, va_list args)
void log_log_color (LEVEL level, LOG_COLOR color, const char *sys, const char *fmt,...)
std::unique_ptr< ILoggerlog_logger_android ()
std::unique_ptr< ILoggerlog_logger_collection (std::vector< std::shared_ptr< ILogger > > &&vpLoggers)
std::unique_ptr< ILoggerlog_logger_file (IOHANDLE logfile)
std::unique_ptr< ILoggerlog_logger_stdout ()
std::unique_ptr< ILoggerlog_logger_windows_debugger ()
std::unique_ptr< ILoggerlog_logger_noop ()

Variables

std::atomic< ILogger * > global_logger = nullptr
ILoggerscope_logger = nullptr
bool in_logger = false

Function Documentation

◆ log_log_impl()

void log_log_impl ( LEVEL level,
bool have_color,
LOG_COLOR color,
const char * sys,
const char * fmt,
va_list args )
static

Variable Documentation

◆ global_logger

std::atomic<ILogger *> global_logger = nullptr

◆ in_logger

bool in_logger = false
thread_local

◆ scope_logger

ILogger* scope_logger = nullptr
thread_local