Elaztek Developer Hub
Blamite Game Engine - Strings  00326.06.27.21.0407.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamStrings::Logger Namespace Reference

Namespace containing functions for the unified logger. More...

Functions

STRINGS_API void PrepareLogger ()
 Prepares the logger. More...
 
STRINGS_API void ShutdownLogger ()
 Shuts down the logger. More...
 
STRINGS_API void LogEvent (BlamBasicLogMessage message)
 Logs an event to the logger. More...
 
STRINGS_API void LogEvent (std::string message)
 Logs an event to the logger. More...
 
STRINGS_API void LogEvent (std::string message, BlamLogLevel log_level)
 Logs an event to the logger. More...
 
STRINGS_API void LogEvent (std::string message, TerminalColor color)
 Logs an event to the logger. More...
 
STRINGS_API void AddReceiver (BlamLogReceiver *receiver)
 Registers a receiver which will be notified on new log messages. More...
 
STRINGS_API void RemoveReceiver (BlamLogReceiver *receiver)
 Unregisters a receiver. More...
 
STRINGS_API std::vector< BlamBasicLogMessageGetHistory ()
 Retrieves log history. More...
 

Detailed Description

Namespace containing functions for the unified logger.

This logger is utilized by each and every application, excluding the game engine itself as it has different requirements for its logging system.

Function Documentation

◆ AddReceiver()

void BlamStrings::Logger::AddReceiver ( BlamLogReceiver receiver)

Registers a receiver which will be notified on new log messages.

Parameters
receiver- The new receiver to add.

◆ GetHistory()

std::vector< BlamBasicLogMessage > BlamStrings::Logger::GetHistory ( )

Retrieves log history.

Returns
Log history.

◆ LogEvent() [1/4]

void BlamStrings::Logger::LogEvent ( BlamBasicLogMessage  message)

Logs an event to the logger.

Parameters
message- The message to log to the console.

◆ LogEvent() [2/4]

void BlamStrings::Logger::LogEvent ( std::string  message)

Logs an event to the logger.

Parameters
message- The message to log to the console.

◆ LogEvent() [3/4]

void BlamStrings::Logger::LogEvent ( std::string  message,
BlamLogLevel  log_level 
)

Logs an event to the logger.

Parameters
message- The message to log to the console.
log_level- The log level of the message.

◆ LogEvent() [4/4]

void BlamStrings::Logger::LogEvent ( std::string  message,
TerminalColor  color 
)

Logs an event to the logger.

Parameters
message- The message to log to the console.
color- The color to use when printing the message to the standard output.

◆ PrepareLogger()

void BlamStrings::Logger::PrepareLogger ( )

Prepares the logger.

If the logger has already been prepared previously, this will have no effect.

The application which is being launched and hooking into the library is responsible for preparing the logger.

◆ RemoveReceiver()

void BlamStrings::Logger::RemoveReceiver ( BlamLogReceiver receiver)

Unregisters a receiver.

This receiver will no longer be notified when new messages are logged.

Parameters
receiver- The receiver to remove.

◆ ShutdownLogger()

void BlamStrings::Logger::ShutdownLogger ( )

Shuts down the logger.

If the logger has already been shut down, this has no effect.

The application which is being launched and hooking into the library is responsible for terminating the logger.