ngscopeclient 0.1-dev+51fbda87c
Functions | Variables
log.cpp File Reference

Implementation of base LogSink class and some global helper functions. More...

#include "log.h"
#include <cstdarg>
#include <cstdlib>
#include <string>
Include dependency graph for log.cpp:

Functions

bool ParseLoggerArguments (int &i, int argc, char *argv[], Severity &console_verbosity)
 Helper function for parsing arguments that use common syntax.
 
void LogFatal (const char *format,...)
 
void LogError (const char *format,...)
 
void LogWarning (const char *format,...)
 
void LogNotice (const char *format,...)
 
void LogVerbose (const char *format,...)
 
void LogDebug (const char *format,...)
 
void LogDebugTrace (const char *function, const char *format,...)
 
void Log (Severity severity, const char *format,...)
 

Variables

mutex g_log_mutex
 Mutex for serializing access to global logging state.
 
__thread unsigned int g_logIndentLevel = 0
 The current indentation level.
 
vector< unique_ptr< LogSink > > g_log_sinks
 The set of log sink objects logtools knows about. More...
 
bool g_logToStdoutAlways = false
 If set, STDLogSink will only write to stdout even for error/warning severity and never use stderr.
 
set< string > g_trace_filters
 Set of classes or class::function for high verbosity trace messages.
 

Detailed Description

Implementation of base LogSink class and some global helper functions.

Variable Documentation

◆ g_log_sinks

vector<unique_ptr<LogSink> > g_log_sinks

The set of log sink objects logtools knows about.

When a log message is printed, it is sent to every sink in this list for filtering and display.