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.
logger.h File Reference
#include <string>
#include <vector>
#include "Strings/components/utils/datetime/datetime.h"

Go to the source code of this file.

Classes

class  BlamBasicLogMessage
 Class represneting a basic log message. More...
 
class  BlamLogReceiver
 Interface used to receive log messages. More...
 
class  BlamBasicLogger
 Class representing a basic logger. More...
 

Namespaces

 BlamStrings
 Namespace for Blamite's shared C++ library.
 
 BlamStrings::Interface
 
 BlamStrings::Interface::Logger
 Namespace containing functions related to the logger.
 

Macros

#define STRINGS_API   __declspec(dllimport)
 
#define LOGGER_ID_GUERILLA   1
 
#define LOGGER_ID_KEYSTONE   2
 
#define LOGGER_ID_STRINGS   3
 
#define LOGGER_ID_TOOL   4
 
#define LOGGER_ID_UNIFIED   5
 

Enumerations

enum  TerminalColor {
  TerminalColor::Black, TerminalColor::Blue, TerminalColor::Green, TerminalColor::Cyan,
  TerminalColor::Red, TerminalColor::Magenta, TerminalColor::Gold, TerminalColor::Gray,
  TerminalColor::DarkGray, TerminalColor::BrightBlue, TerminalColor::BrightGreen, TerminalColor::BrightCyan,
  TerminalColor::BrightRed, TerminalColor::BrightMagenta, TerminalColor::Yellow, TerminalColor::White,
  TerminalColor::Reset
}
 Enumerator listing all possible terminal colors. More...
 
enum  BlamLogLevel {
  BlamLogLevel::None, BlamLogLevel::Warning, BlamLogLevel::Error, BlamLogLevel::Severe,
  BlamLogLevel::Input, BlamLogLevel::AiError
}
 Enumerator to specify log event severity. More...
 

Functions

STRINGS_API std::string BlamStrings::Interface::Logger::GenerateLogLevelPrefix (BlamLogLevel log_level)
 Generates a prefix for a given log level, such as [INFO] or [WARN]. More...
 
STRINGS_API TerminalColor BlamStrings::Interface::Logger::TranslateLogLevelAsColor (BlamLogLevel log_level)
 Translates a given BlamLogLevel into the appropriate terminal color. More...
 
STRINGS_API void BlamStrings::Interface::Logger::PrintMessageToStdout (std::string message, TerminalColor color)
 Prints a message to the standard output. More...
 

Macro Definition Documentation

◆ LOGGER_ID_GUERILLA

#define LOGGER_ID_GUERILLA   1

◆ LOGGER_ID_KEYSTONE

#define LOGGER_ID_KEYSTONE   2

◆ LOGGER_ID_STRINGS

#define LOGGER_ID_STRINGS   3

◆ LOGGER_ID_TOOL

#define LOGGER_ID_TOOL   4

◆ LOGGER_ID_UNIFIED

#define LOGGER_ID_UNIFIED   5

◆ STRINGS_API

#define STRINGS_API   __declspec(dllimport)

Enumeration Type Documentation

◆ BlamLogLevel

enum BlamLogLevel
strong

Enumerator to specify log event severity.

Enumerator
None 

Indicates no severity, and is displayed with no formatting.

Warning 

Indicates a warning message. Not something critical, but something that could cause unexpected behavior.

Error 

Indicates an error that could cause engine instability.

Severe 

Indicates a severe error that the engine cannot recover from.

Input 

Indicates that the user has executed a command from console.

Deprecated:
Will be removed in the future, this should be handled from console directly rather than a log level. This exists as originally it was added under 'Info', which was redundant due to the presence of a 'None' level.
AiError 

Placeholder for the future, indicates an error with AI.

Deprecated:
Will be removed in the future, this should be handled from any future AI systems directly rather than a log severity.

◆ TerminalColor

enum TerminalColor
strong

Enumerator listing all possible terminal colors.

While the BlamBasicLogger does not support terminal output natively, applications which use it may wish to implement more complex terminal formatting - using colors.

Enumerator
Black 
Blue 
Green 
Cyan 
Red 
Magenta 
Gold 
Gray 
DarkGray 
BrightBlue 
BrightGreen 
BrightCyan 
BrightRed 
BrightMagenta 
Yellow 
White 
Reset