Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Error/warning/message logging class. More...
#include <CLogger.h>
Classes | |
struct | RenderedMessage |
class | ScopedReplacement |
Replaces g_Logger for as long as it's in scope. More... | |
Public Types | |
enum | ELogMethod { Normal , Error , Warning } |
Public Member Functions | |
CLogger (std::ostream &mainLog, std::ostream &interestingLog, const bool useDebugPrintf) | |
~CLogger () | |
void | WriteMessage (const char *message, bool doRender) |
void | WriteError (const char *message) |
void | WriteWarning (const char *message) |
void | Render (CCanvas2D &canvas) |
Private Member Functions | |
NONCOPYABLE (CLogger) | |
void | Init () |
void | PushRenderMessage (ELogMethod method, const char *message) |
void | CleanupRenderQueue () |
Private Attributes | |
std::ostream & | m_MainLog |
std::ostream & | m_InterestingLog |
bool | m_UseDebugPrintf |
int | m_NumberOfMessages {0} |
int | m_NumberOfErrors {0} |
int | m_NumberOfWarnings {0} |
std::deque< RenderedMessage > | m_RenderMessages |
double | m_RenderLastEraseTime {-1.0} |
std::mutex | m_Mutex |
Error/warning/message logging class.
Thread-safety:
enum CLogger::ELogMethod |
CLogger::CLogger | ( | std::ostream & | mainLog, |
std::ostream & | interestingLog, | ||
const bool | useDebugPrintf | ||
) |
CLogger::~CLogger | ( | ) |
|
private |
|
private |
|
private |
|
private |
void CLogger::Render | ( | CCanvas2D & | canvas | ) |
void CLogger::WriteError | ( | const char * | message | ) |
void CLogger::WriteMessage | ( | const char * | message, |
bool | doRender = false |
||
) |
void CLogger::WriteWarning | ( | const char * | message | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |