Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CLogger.cpp File Reference
#include "precompiled.h"
#include "CLogger.h"
#include "graphics/Canvas2D.h"
#include "graphics/FontMetrics.h"
#include "graphics/TextRenderer.h"
#include "lib/os_path.h"
#include "lib/timer.h"
#include "lib/utf8.h"
#include "ps/CConsole.h"
#include "ps/CStr.h"
#include "ps/CStrInternStatic.h"
#include "ps/Profile.h"
#include "ps/Pyrogenesis.h"
#include <ctime>
#include <fstream>
#include <iostream>
#include <utility>
#include <boost/algorithm/string/replace.hpp>
Include dependency graph for CLogger.cpp:

Classes

struct  BlackHoleStreamBuf
 

Namespaces

namespace  anonymous_namespace{CLogger.cpp}
 

Functions

static std::string ToHTML (const char *message)
 
std::ofstream anonymous_namespace{CLogger.cpp}::OpenLogFile (const wchar_t *filePrefix, const char *logName)
 

Variables

CStrW g_UniqueLogPostfix
 
static const double RENDER_TIMEOUT = 10.0
 
static const double RENDER_TIMEOUT_RATE = 10.0
 
static const size_t RENDER_LIMIT = 20
 
BlackHoleStreamBuf blackHoleStreamBuf
 
CLogger nullLogger {blackHoleStream, blackHoleStream, true}
 
CLoggerg_Logger = &nullLogger
 
const char * html_header0
 
const char * html_header1 = "</h2>\n"
 

Function Documentation

◆ ToHTML()

static std::string ToHTML ( const char *  message)
static

Variable Documentation

◆ blackHoleStreamBuf

std::ostream blackHoleStream & blackHoleStreamBuf

◆ g_Logger

CLogger* g_Logger = &nullLogger

◆ g_UniqueLogPostfix

CStrW g_UniqueLogPostfix

◆ html_header0

const char* html_header0
Initial value:
=
"<!DOCTYPE html>\n"
"<meta charset=\"utf-8\">\n"
"<title>Pyrogenesis Log</title>\n"
"<style>"
"body { background: #eee; color: black; font-family: sans-serif; } "
"p { background: white; margin: 3px 0 3px 0; } "
".error { color: red; } "
".warning { color: blue; }"
"</style>\n"
"<h2>0 A.D. ("

◆ html_header1

const char* html_header1 = "</h2>\n"

◆ nullLogger

CLogger nullLogger {blackHoleStream, blackHoleStream, true}

◆ RENDER_LIMIT

const size_t RENDER_LIMIT = 20
static

◆ RENDER_TIMEOUT

const double RENDER_TIMEOUT = 10.0
static

◆ RENDER_TIMEOUT_RATE

const double RENDER_TIMEOUT_RATE = 10.0
static