Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CLogger.h File Reference
#include <deque>
#include <fmt/printf.h>
#include <fstream>
#include <mutex>
#include <string>
#include <sstream>
Include dependency graph for CLogger.h:

Go to the source code of this file.

Classes

class  CLogger
 Error/warning/message logging class. More...
 
struct  CLogger::RenderedMessage
 
class  CLogger::ScopedReplacement
 Replaces g_Logger for as long as it's in scope. More...
 
class  FileLogger
 This is used in the engine to log the messages to the logfiles. More...
 
class  TestLogger
 Helper class for unit tests - captures all log output, and returns it as a single string. More...
 
class  TestStdoutLogger
 Helper class for unit tests - redirects all log output to stdout. More...
 

Macros

#define LOGMESSAGE(...)   g_Logger->WriteMessage(fmt::sprintf(__VA_ARGS__).c_str(), false)
 
#define LOGMESSAGERENDER(...)   g_Logger->WriteMessage(fmt::sprintf(__VA_ARGS__).c_str(), true)
 
#define LOGWARNING(...)   g_Logger->WriteWarning(fmt::sprintf(__VA_ARGS__).c_str())
 
#define LOGERROR(...)   g_Logger->WriteError (fmt::sprintf(__VA_ARGS__).c_str())
 

Variables

CLoggerg_Logger
 

Macro Definition Documentation

◆ LOGERROR

#define LOGERROR (   ...)    g_Logger->WriteError (fmt::sprintf(__VA_ARGS__).c_str())

◆ LOGMESSAGE

#define LOGMESSAGE (   ...)    g_Logger->WriteMessage(fmt::sprintf(__VA_ARGS__).c_str(), false)

◆ LOGMESSAGERENDER

#define LOGMESSAGERENDER (   ...)    g_Logger->WriteMessage(fmt::sprintf(__VA_ARGS__).c_str(), true)

◆ LOGWARNING

#define LOGWARNING (   ...)    g_Logger->WriteWarning(fmt::sprintf(__VA_ARGS__).c_str())

Variable Documentation

◆ g_Logger

CLogger* g_Logger
extern