 |
Blamite Game Engine - blam!
00368.02.12.23.1347.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
6 #include <Strings/components/interface/logger/logger.h>
10 #define DEFAULT_LOG_FILENAME "debug"
36 std::string file_title =
"";
37 std::string file_path =
"";
39 bool stylized_html_logs =
false;
41 std::string file_contents =
"";
61 bool PrepareAsPlainText();
70 bool AppendMessageToHTML(BlamLogMessage message);
79 bool AppendMessageToPlainText(BlamLogMessage message);
143 bool stylized_html_logs =
false;
144 bool log_ready =
false;
146 std::vector<BlamReportFile*> log_files = std::vector<BlamReportFile*>();
158 BlamReport(BlamReportType type, std::string filename);
172 bool LogEvent(BlamLogMessage message);
324 BLAM void LogEvent(std::string message,
bool show_timestamp);
332 BLAM void LogEvent(std::string message, BlamReportType report_type);
341 BLAM void LogEvent(std::string message,
bool show_timestamp, BlamLogLevel severity);
353 BLAM void LogEvent(std::string message,
bool show_timestamp, BlamLogLevel severity,
short r,
short g,
short b);
361 BLAM void LogEvent(std::string message, BlamLogLevel severity);
370 BLAM void LogEvent(std::string message, BlamLogLevel severity, BlamReportType report_type);
379 BLAM void LogEvent(std::string message, BlamLogLevel severity, BlamLogVisibility visibility);
396 BLAM void LogEvent(std::string message, BlamColor
color, BlamLogVisibility visibility);
435 BLAM void LogEventForce(std::string message, BlamLogLevel severity, BlamLogVisibility visibility);
444 BLAM void LogEventForce(std::string message, BlamLogLevel severity, BlamReportType report_type);
BlamLogFileFormat
Enumerator containing possible log file formats.
Definition: logger.h:21
BlamReportFile(BlamLogFileFormat file_format, std::string base_dir, BlamReport *_report)
Creates a new BlamReportFile.
Definition: BlamReportFile.cpp:11
@ 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:70
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
Class representing a report file.
Definition: logger.h:140
BLAM BlamColor GetLogLevelColor(BlamLogLevel log_level)
Retrieves the BlamColor that a specific log level should display with.
Definition: aliases.cpp:12
void Flush()
Flushes the contents of each report file to disk.
Definition: BlamReport.cpp:184
BLAM void StopFlushThread()
Definition: queue.cpp:217
@ PlainText
The log file will be written in a plain text (.txt) format.
Class representing a report file.
Definition: logger.h:33
@ 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:187
void PrintStartupHeader()
Prints the startup header to the log.
Definition: BlamReport.cpp:103
BLAM std::string GetLogLevelCSSClass(BlamLogLevel log_level)
Gets the CSS class name for the specified log level.
Definition: logger.cpp:177
bool AppendMessage(BlamLogMessage message)
Appends a message to the log file.
Definition: BlamReportFile.cpp:264
void MarkAsReady()
Marks the report as ready for use.
Definition: BlamReport.cpp:179
bool PrepareFile()
Prepares the log file for writing.
Definition: BlamReportFile.cpp:238
std::string report_filename
The filename of this report, without the extension.
Definition: logger.h:149
bool LogEvent(BlamLogMessage message)
Writes a message to the log file, console, and/or STDOUT depending on the message.
Definition: BlamReport.cpp:77
BLAM void Flush()
Flushes the queue, causing all messages to be written to all places they are configured to do so.
Definition: queue.cpp:38
bool IsReady()
Whether or not the report is ready for use.
Definition: BlamReport.cpp:174
BLAM void Shutdown()
Flushes the queue and may later be used to perform other shutdown tasks.
Definition: queue.cpp:32
BlamReportType report_type
The type of this report.
Definition: logger.h:150
#define BLAM
Definition: logger.h:13
BLAM void StartFlushThread()
Definition: queue.cpp:212
BLAM std::vector< BlamReport * > GetReports()
Retrieves the list of reports.
Definition: logger.cpp:194
BLAM void Shutdown()
Shuts down the logger.
Definition: logger.cpp:151
void Flush()
Flushes current report contents to disk.
Definition: BlamReportFile.cpp:281
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:274
void Initialize()
Initializes the report to ensure it is ready for use.
Definition: BlamReport.cpp:18
~BlamReportFile()
Definition: BlamReportFile.cpp:86
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:112
Namespace containing things related to the Blamite Logger.
Definition: logger.h:200
BLAM void FlushThread()
Definition: queue.cpp:196
BLAM void Initialize()
Initializes the logger queue.
Definition: queue.cpp:25
BLAM void Initialize()
Prepares the logger for use.
Definition: logger.cpp:115
BLAM BlamReport * GetReport(BlamReportType type)
Retrieves report data with the specified type.
Definition: logger.cpp:164