Cuberite
A lightweight, fast and extensible game server for Minecraft
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
cLogger Class Reference

#include <Logger.h>

Collaboration diagram for cLogger:
Collaboration graph
[legend]

Classes

class  cAttachment
 
class  cListener
 

Public Member Functions

cAttachment AttachListener (std::unique_ptr< cListener > a_Listener)
 
void LogFormat (std::string_view a_Format, eLogLevel a_LogLevel, fmt::format_args a_ArgList)
 Log a message formatted with a python style formatting string. More...
 
void LogPrintf (std::string_view a_Format, eLogLevel a_LogLevel, fmt::printf_args a_ArgList)
 Log a message formatted with a printf style formatting string. More...
 
void LogSimple (std::string_view a_Message, eLogLevel a_LogLevel=eLogLevel::Regular)
 Logs the simple text message at the specified log level. More...
 

Static Public Member Functions

static cLoggerGetInstance (void)
 
static void InitiateMultithreading ()
 

Private Member Functions

void DetachListener (cListener *a_Listener)
 
void LogLine (std::string_view a_Line, eLogLevel a_LogLevel)
 

Private Attributes

cCriticalSection m_CriticalSection
 
std::vector< std::unique_ptr< cListener > > m_LogListeners
 

Detailed Description

Definition at line 5 of file Logger.h.

Member Function Documentation

◆ AttachListener()

cLogger::cAttachment cLogger::AttachListener ( std::unique_ptr< cListener a_Listener)

Definition at line 115 of file Logger.cpp.

◆ DetachListener()

void cLogger::DetachListener ( cListener a_Listener)
private

Definition at line 129 of file Logger.cpp.

◆ GetInstance()

cLogger & cLogger::GetInstance ( void  )
static

Definition at line 43 of file Logger.cpp.

◆ InitiateMultithreading()

void cLogger::InitiateMultithreading ( )
static

Definition at line 53 of file Logger.cpp.

◆ LogFormat()

void cLogger::LogFormat ( std::string_view  a_Format,
eLogLevel  a_LogLevel,
fmt::format_args  a_ArgList 
)

Log a message formatted with a python style formatting string.

Definition at line 101 of file Logger.cpp.

◆ LogLine()

void cLogger::LogLine ( std::string_view  a_Line,
eLogLevel  a_LogLevel 
)
private

Definition at line 74 of file Logger.cpp.

◆ LogPrintf()

void cLogger::LogPrintf ( std::string_view  a_Format,
eLogLevel  a_LogLevel,
fmt::printf_args  a_ArgList 
)

Log a message formatted with a printf style formatting string.

Definition at line 87 of file Logger.cpp.

◆ LogSimple()

void cLogger::LogSimple ( std::string_view  a_Message,
eLogLevel  a_LogLevel = eLogLevel::Regular 
)

Logs the simple text message at the specified log level.

Definition at line 62 of file Logger.cpp.

Member Data Documentation

◆ m_CriticalSection

cCriticalSection cLogger::m_CriticalSection
private

Definition at line 70 of file Logger.h.

◆ m_LogListeners

std::vector<std::unique_ptr<cListener> > cLogger::m_LogListeners
private

Definition at line 71 of file Logger.h.


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