![]() |
Blamite Game Engine - Strings
00307.01.26.21.0804.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Class representing a basic logger. More...
#include <logger.h>
Public Member Functions | |
BlamBasicLogger () | |
Initializes a new logger. More... | |
void | ClearHistory () |
Clears all log history. More... | |
std::vector< BlamBasicLogMessage > | GetHistory () |
Retrieves the log history. More... | |
void | LogEvent (BlamBasicLogMessage message) |
Writes a message to the log. More... | |
void | LogEvent (std::string message) |
Writes a message to the log. More... | |
void | LogEvent (std::string message, BlamLogLevel log_level) |
Writes a message to the log. More... | |
void | AddReceiver (BlamLogReceiver *receiver) |
Registers a receiver to this logger. More... | |
void | RemoveReceiver (BlamLogReceiver *receiver) |
Unregisters a receiver from this logger. More... | |
Class representing a basic logger.
In order to avoid having multiple applications implement their own logging systems, they can instead use one of these. This logger provides basic logging functionality. It does not organize log messages into reports, so the engine itself wouldn't be able to use one of these. But many of the editing tools do not require the use of reports, so all that is needed is a simple log.
BlamBasicLogger::BlamBasicLogger | ( | ) |
Initializes a new logger.
void BlamBasicLogger::AddReceiver | ( | BlamLogReceiver * | receiver | ) |
Registers a receiver to this logger.
The receiver will be notified whenever a new log message is received.
receiver | - The receiver to add. |
void BlamBasicLogger::ClearHistory | ( | ) |
Clears all log history.
Cannot be undone.
std::vector< BlamBasicLogMessage > BlamBasicLogger::GetHistory | ( | ) |
Retrieves the log history.
void BlamBasicLogger::LogEvent | ( | BlamBasicLogMessage | message | ) |
Writes a message to the log.
message | - The new message to log. |
void BlamBasicLogger::LogEvent | ( | std::string | message | ) |
Writes a message to the log.
message | - The new message to log. |
void BlamBasicLogger::LogEvent | ( | std::string | message, |
BlamLogLevel | log_level | ||
) |
Writes a message to the log.
message | - The new message to log. |
log_level | - The log level of the message. |
void BlamBasicLogger::RemoveReceiver | ( | BlamLogReceiver * | receiver | ) |
Unregisters a receiver from this logger.
The receiver will no longer be notified whenever a new log message is received.
receiver | - The receiver to remove. |