Elaztek Developer Hub
Blamite Game Engine - Strings  00386.06.16.23.0646.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 BlamBasicLoggerGetLogger ()
 Retrieves the unified logger. More...
 
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.
+ Here is the call graph for this function:

◆ GetHistory()

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

Retrieves log history.

Returns
Log history.
+ Here is the call graph for this function:

◆ GetLogger()

BlamBasicLogger * BlamStrings::Logger::GetLogger ( )

Retrieves the unified logger.

Should be used sparingly.

Returns
A pointer to the unified logger.

◆ LogEvent() [1/4]

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

Logs an event to the logger.

Parameters
message- The message to log to the console.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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.
+ Here is the call graph for this function:

◆ 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.
+ Here is the call graph for this function:

◆ 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.
+ Here is the call graph for this function:

◆ 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.

+ Here is the caller graph for this function:

◆ 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.
+ Here is the call graph for this function:

◆ 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.