Chatsync  bbffde5c0c672a526bdc83637acf66dc20a80fbf
logging.hpp File Reference
#include <iostream>
#include <queue>
#include <mutex>
#include <condition_variable>
#include <chrono>
#include <thread>
#include <atomic>
#include <sstream>
#include <iomanip>

Go to the source code of this file.

Data Structures

struct  logging::LogMessage
 
struct  logging::LogSink
 
class  logging::LogSinkPrinter
 
class  logging::LoggerImpl
 
class  logging::LogWriter< s >
 

Namespaces

 logging
 

Macros

#define LOG(lvl)   logging::LogWriter<lvl>
 
#define TRACE   LOG(logging::Severity::trace)() << __FILE__ << ":" << __LINE__ << " "
 
#define DEBUG   LOG(logging::Severity::debug)()
 
#define INFO   LOG(logging::Severity::info)()
 
#define WARNING   LOG(logging::Severity::warning)()
 
#define ERROR   LOG(logging::Severity::error)()
 
#define FATAL   LOG(logging::Severity::fatal)()
 
#define DEFAULT_LOGGING
 

Enumerations

enum  logging::Severity {
  logging::fatal, logging::error, logging::warning, logging::info,
  logging::debug, logging::trace
}
 

Variables

const std::string logging::severity_lines []
 

Macro Definition Documentation

§ DEBUG

#define DEBUG   LOG(logging::Severity::debug)()

§ DEFAULT_LOGGING

#define DEFAULT_LOGGING
Value:
auto default_sink = std::make_shared<logging::LogSinkPrinter>(); \
logging::LoggerImpl::get().setOutput(std::static_pointer_cast<logging::LogSink>(default_sink));
static LoggerImpl & get()
Definition: logging.cpp:56
void setOutput(const std::shared_ptr< LogSink > &output)
Definition: logging.cpp:64

§ ERROR

#define ERROR   LOG(logging::Severity::error)()

§ FATAL

#define FATAL   LOG(logging::Severity::fatal)()

§ INFO

#define INFO   LOG(logging::Severity::info)()

§ LOG

#define LOG (   lvl)    logging::LogWriter<lvl>

§ TRACE

#define TRACE   LOG(logging::Severity::trace)() << __FILE__ << ":" << __LINE__ << " "

§ WARNING

#define WARNING   LOG(logging::Severity::warning)()