 |
Blamite Game Engine - Strings
00367.02.08.23.1815.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Go to the documentation of this file.
10 #define STRINGS_API __declspec(dllexport)
12 #define STRINGS_API __declspec(dllimport)
15 #define LOGGER_ID_GUERILLA 1
16 #define LOGGER_ID_KEYSTONE 2
17 #define LOGGER_ID_STRINGS 3
18 #define LOGGER_ID_TOOL 4
19 #define LOGGER_ID_UNIFIED 5
22 #define WSV_NONE BlamLogLevel::None
23 #define WSV_ERROR BlamLogLevel::Error
24 #define WSV_WARNING BlamLogLevel::Warning
25 #define WSV_SEVERE BlamLogLevel::Severe
69 #define WVIS_NONE BlamLogVisibility::None
70 #define WVIS_ALL BlamLogVisibility::All
71 #define WVIS_STDOUT_ONLY BlamLogVisibility::StdoutOnly
72 #define WVIS_FILE_ONLY BlamLogVisibility::FileOnly
73 #define WVIS_HTML_ONLY BlamLogVisibility::HTMLOnly
74 #define WVIS_TXT_ONLY BlamLogVisibility::TXTOnly
111 bool show_timestamp =
true;
113 bool override_color =
false;
118 bool override_duplicate_limit =
false;
130 bool has_custom_color =
false;
131 std::string message =
"";
132 std::string timestamp =
"";
145 std::string GetMessageLine();
182 bool print_to_stdout =
false;
184 std::vector<BlamBasicLogMessage> history = std::vector<BlamBasicLogMessage>();
185 std::vector<BlamLogReceiver*> receivers = std::vector<BlamLogReceiver*>();
213 void SetCommandLinePrintingEnabled(
bool print_to_cmd);
220 std::vector<BlamBasicLogMessage>
GetHistory();
@ All
The message will be shown in all places where log output can be written.
STRINGS_API void LogEvent(std::string message, TerminalColor color)
Logs an event to the logger.
Definition: logger.cpp:57
Interface used to receive log messages.
Definition: logger.h:160
BlamLogVisibility
Enumerator to specify log event visibility.
Definition: logger.h:79
@ ShadersDebug
BlamReport file for shader messages.
Class represneting a basic log message.
Definition: logger.h:124
STRINGS_API std::string GenerateLogLevelPrefix(BlamLogLevel log_level)
Generates a prefix for a given log level, such as [INFO] or [WARN].
Definition: logger.cpp:7
STRINGS_API void AddReceiver(BlamLogReceiver *receiver)
Registers a receiver which will be notified on new log messages.
Definition: logger.cpp:67
virtual void LogMessageReceived(BlamBasicLogMessage message)
Called whenever a log message is received.
Definition: logger.h:168
#define STRINGS_API
Definition: logger.h:12
BlamColor color
The overridden color information. Overrules any severity-based coloring.
Definition: logger.h:114
std::string message
The message contents.
Definition: logger.h:109
@ FileOnly
The message will only be written to the log file.
#define WVIS_ALL
Macro for 'All' log visibility. Original pre-enum value was 0.
Definition: logger.h:70
@ HTMLOnly
The message will only be written to the log file, if the file is in HTML format.
@ UIDebug
BlamReport file for all UI messages.
@ TXTOnly
The message will only be written to the log file, if the file is in plain text format.
STRINGS_API TerminalColor TranslateLogLevelAsColor(BlamLogLevel log_level)
Translates a given BlamLogLevel into the appropriate terminal color.
Definition: logger.cpp:29
STRINGS_API void RemoveReceiver(BlamLogReceiver *receiver)
Unregisters a receiver.
Definition: logger.cpp:77
BlamReportType
Enumerator containing possible report types.
Definition: logger.h:92
@ DebugFull
Similar to debug, but includes additional messages that would be hidden from debug.
@ Error
Indicates an error that could cause engine instability.
@ None
Indicates no severity, and is displayed with no formatting.
@ TagDebug
BlamReport file for all tag related messages.
@ Severe
Indicates a severe error that the engine cannot recover from.
@ Debug
Default report file. Contains all log messages found in other reports, excluding debug_full.
#define WSV_NONE
Macro for 'None' log seveirty.
Definition: logger.h:22
Structure to store log message data.
Definition: logger.h:104
Namespace containing functions related to the logger.
Definition: logger.h:270
STRINGS_API std::vector< BlamBasicLogMessage > GetHistory()
Retrieves log history.
Definition: logger.cpp:87
std::string timestamp
The timestamp of the log message.
Definition: logger.h:108
TerminalColor
Enumerator listing all possible terminal colors.
Definition: logger.h:35
@ StdoutOnly
The message will only be shown to the in-game console and STDOUT.
Class representing a color.
Definition: BlamColor.h:19
Class representing a basic logger.
Definition: logger.h:179
BlamLogLevel
Enumerator to specify log event severity.
Definition: logger.h:60
@ Warning
Indicates a warning message. Not something critical, but something that could cause unexpected behavi...
STRINGS_API void PrintMessageToStdout(std::string message, TerminalColor color)
Prints a message to the standard output.
Definition: logger.cpp:49