Rise
The Vieneo Province
Loading...
Searching...
No Matches
Logger Class Reference

#include <Logger.h>

Collaboration diagram for Logger:
[legend]

Classes

struct  CrashState

Public Types

enum  Level {
  None = -1 , Info = 0 , Warn = 1 , Debug = 2 ,
  Error = 3 , Fatal = 4
}

Public Member Functions

void SendTraceFile (bool waitForDelivery=true) const
void Log (const char *msg, Level level=Info, int errorCode=0)
void AddToCallStack (const char *msg)
void SetNetworkingPointer (Networking *prmNetworking)
void SendPendingCrashReports ()
void ConfirmTraceDelivery (std::uint32_t receipt)
void RecordCrash (const char *reason, unsigned long code=0, struct _EXCEPTION_POINTERS *exception=nullptr) noexcept
 Logger ()
 ~Logger ()

Static Public Member Functions

static long __stdcall HandleNativeException (struct _EXCEPTION_POINTERS *exception)

Public Attributes

std::string lastError
Level lastLevel = Level::None
int lastErrorCode = 0

Private Member Functions

std::uint32_t QueueTraceFile (bool requestReceipt) const

Static Private Member Functions

static void RemoveOldFiles (const wchar_t *searchkey, int maxDays)

Private Attributes

std::unique_ptr< CrashState > crash
Networking * networking = nullptr
char fileName [99] = { 0 }
CrashBreadcrumbs breadcrumbs

Detailed Description

Definition at line 10 of file Logger.h.

Member Enumeration Documentation

◆ Level

Enumerator
None 
Info 
Warn 
Debug 
Error 
Fatal 

Definition at line 22 of file Logger.h.

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( )

Definition at line 392 of file Logger.cpp.

Here is the call graph for this function:

◆ ~Logger()

Logger::~Logger ( )

Definition at line 448 of file Logger.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ AddToCallStack()

void Logger::AddToCallStack ( const char * msg)

Definition at line 355 of file Logger.cpp.

Here is the call graph for this function:

◆ ConfirmTraceDelivery()

void Logger::ConfirmTraceDelivery ( std::uint32_t receipt)

Definition at line 265 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleNativeException()

long __stdcall Logger::HandleNativeException ( struct _EXCEPTION_POINTERS * exception)
static

Definition at line 88 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Log()

void Logger::Log ( const char * msg,
Level level = Info,
int errorCode = 0 )

Definition at line 283 of file Logger.cpp.

Here is the call graph for this function:

◆ QueueTraceFile()

std::uint32_t Logger::QueueTraceFile ( bool requestReceipt) const
private

Definition at line 212 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecordCrash()

void Logger::RecordCrash ( const char * reason,
unsigned long code = 0,
struct _EXCEPTION_POINTERS * exception = nullptr )
noexcept

Definition at line 98 of file Logger.cpp.

Here is the caller graph for this function:

◆ RemoveOldFiles()

void Logger::RemoveOldFiles ( const wchar_t * searchkey,
int maxDays )
staticprivate

Definition at line 364 of file Logger.cpp.

Here is the caller graph for this function:

◆ SendPendingCrashReports()

void Logger::SendPendingCrashReports ( )

Definition at line 221 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendTraceFile()

void Logger::SendTraceFile ( bool waitForDelivery = true) const

Definition at line 207 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNetworkingPointer()

void Logger::SetNetworkingPointer ( Networking * prmNetworking)

Definition at line 362 of file Logger.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ breadcrumbs

CrashBreadcrumbs Logger::breadcrumbs
private

Definition at line 16 of file Logger.h.

◆ crash

std::unique_ptr<CrashState> Logger::crash
private

Definition at line 13 of file Logger.h.

◆ fileName

char Logger::fileName[99] = { 0 }
private

Definition at line 15 of file Logger.h.

◆ lastError

std::string Logger::lastError

Definition at line 43 of file Logger.h.

◆ lastErrorCode

int Logger::lastErrorCode = 0

Definition at line 45 of file Logger.h.

◆ lastLevel

Level Logger::lastLevel = Level::None

Definition at line 44 of file Logger.h.

◆ networking

Networking* Logger::networking = nullptr
private

Definition at line 14 of file Logger.h.


The documentation for this class was generated from the following files: