 |
Blamite Game Engine - blam!
00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
5 #include <Strings/components/interface/logger/logger.h>
9 #define DEFAULT_LOG_FILENAME "debug"
18 #define WVIS_NONE BlamLogVisibility::None
19 #define WVIS_ALL BlamLogVisibility::All
20 #define WVIS_STDOUT_ONLY BlamLogVisibility::StdoutOnly
21 #define WVIS_FILE_ONLY BlamLogVisibility::FileOnly
22 #define WVIS_HTML_ONLY BlamLogVisibility::HTMLOnly
23 #define WVIS_TXT_ONLY BlamLogVisibility::TXTOnly
89 std::string file_title =
"";
90 std::string file_path =
"";
92 bool stylized_html_logs =
false;
103 bool PrepareAsHTML();
113 bool PrepareAsPlainText();
185 bool stylized_html_logs =
false;
186 bool log_ready =
false;
188 std::vector<BlamReportFile*> log_files = std::vector<BlamReportFile*>();
338 BLAM void LogEvent(std::string message,
bool show_timestamp);
355 BLAM void LogEvent(std::string message,
bool show_timestamp, BlamLogLevel severity);
367 BLAM void LogEvent(std::string message,
bool show_timestamp, BlamLogLevel severity,
short r,
short g,
short b);
375 BLAM void LogEvent(std::string message, BlamLogLevel severity);
401 BLAM void LogEvent(std::string message, BlamColor color);
BlamReportType report_type
The report that the message is intended for.
Definition: logger.h:65
BlamLogFileFormat
Enumerator containing possible log file formats.
Definition: logger.h:53
@ 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.
BlamReportFile(BlamLogFileFormat file_format, std::string base_dir, BlamReport *_report)
Creates a new BlamReportFile.
Definition: BlamReportFile.cpp:10
@ HTML
The log file will be written with an HTML format.
BLAM void AddMessage(BlamLogMessage message)
Adds a message to the queue.
Definition: queue.cpp:60
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:141
@ TagDebug
BlamReport file for all tag related messages.
Class representing a report file.
Definition: logger.h:182
@ HTMLOnly
The message will only be written to the log file, if the file is in HTML format.
BlamReportType
Enumerator containing possible report types.
Definition: logger.h:41
@ PlainText
The log file will be written in a plain text (.txt) format.
Class representing a report file.
Definition: logger.h:86
@ Both
The log file will be written as both an HTML document and a plain text document.
BLAM std::vector< BlamLogMessage > * GetQueue()
Retrieves the current message queue.
Definition: queue.cpp:177
void PrintStartupHeader()
Prints the startup header to the log.
Definition: BlamReport.cpp:100
BlamLogVisibility visibility
The visibility of the log message.
Definition: logger.h:75
BlamColor color
The overridden color information. Overrules any severity-based coloring.
Definition: logger.h:73
std::string message
The message contents.
Definition: logger.h:68
BLAM std::string GetLogLevelCSSClass(BlamLogLevel log_level)
Gets the CSS class name for the specified log level.
Definition: logger.cpp:175
bool AppendMessage(BlamLogMessage message)
Appends a message to the log file.
Definition: BlamReportFile.cpp:281
void MarkAsReady()
Marks the report as ready for use.
Definition: BlamReport.cpp:176
bool override_color
Whether or not to override the message color.
Definition: logger.h:72
bool PrepareFile()
Prepares the log file for writing.
Definition: BlamReportFile.cpp:259
@ All
The message will be shown in all places where log output can be written.
@ StdoutOnly
The message will only be shown to the in-game console and STDOUT.
std::string report_filename
The filename of this report, without the extension.
Definition: logger.h:191
bool LogEvent(BlamLogMessage message)
Writes a message to the log file, console, and/or STDOUT depending on the message.
Definition: BlamReport.cpp:77
BlamLogVisibility
Enumerator to specify log event visibility.
Definition: logger.h:28
BLAM void Flush()
Flushes the queue, causing all messages to be written to all places they are configured to do so.
Definition: queue.cpp:36
bool IsReady()
Whether or not the report is ready for use.
Definition: BlamReport.cpp:171
BLAM void Shutdown()
Flushes the queue and may later be used to perform other shutdown tasks.
Definition: queue.cpp:31
@ ShadersDebug
BlamReport file for shader messages.
BlamReportType report_type
The type of this report.
Definition: logger.h:192
#define BLAM
Definition: logger.h:12
@ Debug
Default report file. Contains all log messages found in other reports, excluding debug_full.
#define WVIS_ALL
Macro for 'All' log visibility. Original pre-enum value was 0.
Definition: logger.h:19
@ FileOnly
The message will only be written to the log file.
BLAM void Shutdown()
Shuts down the logger.
Definition: logger.cpp:151
bool override_duplicate_limit
Whether or not this message should ignore the duplicate message limit.
Definition: logger.h:77
bool show_timestamp
Whether or not to show the timestamp of the message in the log file.
Definition: logger.h:70
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:258
void Initialize()
Initializes the report to ensure it is ready for use.
Definition: BlamReport.cpp:18
Structure to store log message data.
Definition: logger.h:63
BlamReport(BlamReportType type, std::string filename)
Initializes a new BlamReport.
Definition: BlamReport.cpp:12
BLAM void LogEventAsync(std::string message)
Logs a message to the log and/or console asynchronously.
Definition: aliases.cpp:111
@ DebugFull
Similar to debug, but includes additional messages that would be hidden from debug.
std::string timestamp
The timestamp of the log message.
Definition: logger.h:67
Namespace containing things related to the Blamite Logger.
Definition: logger.h:237
BLAM void Initialize()
Initializes the logger queue.
Definition: queue.cpp:24
BLAM void Initialize()
Prepares the logger for use.
Definition: logger.cpp:115
BlamLogLevel severity
The message severity. Defaults to None.
Definition: logger.h:69
BLAM BlamReport * GetReport(BlamReportType type)
Retrieves report data with the specified type.
Definition: logger.cpp:162