![]() |
Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
|
Class representing a report file. More...
#include <logger.h>
Public Member Functions | |
BlamReport (BlamReportType type, std::string filename) | |
Initializes a new BlamReport. More... | |
void | Initialize () |
Initializes the report to ensure it is ready for use. More... | |
HRESULT | WriteLineToFile (BlamLogMessage message) |
Writes a line to the report's log file(s). More... | |
int | LogEvent (BlamLogMessage message) |
Writes a message to the log file, console, and/or STDOUT depending on the message. More... | |
void | PrintStartupHeader () |
Prints the startup header to the log. More... | |
bool | IsReady () |
Whether or not the report is ready for use. More... | |
void | MarkAsReady () |
Marks the report as ready for use. More... | |
Public Attributes | |
std::string | report_filename |
BlamReportType | report_type |
Class representing a report file.
Reports are used to help ensure that logs can be more easily explored. While the default report file (debug.html/debug.txt) will contain all logged messages, those messages will often also be written to a secondary, more specific file. For instance, any script messages would be written to hs_log
, any tag-related messages would be written to tag_debug
, and so on.
The default 'Debug' report will always be created and acts as the default log file, regardless of if reports are disabled in the config or not.
|
inline |
Initializes a new BlamReport.
type | - The type of report. Must be unique. |
filename | - The filename for the report, without any file extensions. |
void BlamReport::Initialize | ( | ) |
Initializes the report to ensure it is ready for use.
bool BlamReport::IsReady | ( | ) |
Whether or not the report is ready for use.
true
if the logger is ready, otherwise returns false
. int BlamReport::LogEvent | ( | BlamLogMessage | message | ) |
Writes a message to the log file, console, and/or STDOUT depending on the message.
message | - The message to log. |
void BlamReport::MarkAsReady | ( | ) |
Marks the report as ready for use.
void BlamReport::PrintStartupHeader | ( | ) |
Prints the startup header to the log.
HRESULT BlamReport::WriteLineToFile | ( | BlamLogMessage | message | ) |
Writes a line to the report's log file(s).
message | - The message to add to the log file. |
S_OK
if the message was written without error, otherwise returns E_FAIL
. std::string BlamReport::report_filename |
BlamReportType BlamReport::report_type |