 |
Blamite Game Engine - blam!
00285.12.18.20.1411.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
8 #define DEFAULT_LOG_FILENAME "debug"
15 #define WSV_NONE BlamLogLevel::None
16 #define WSV_ERROR BlamLogLevel::Error
17 #define WSV_WARNING BlamLogLevel::Warning
18 #define WSV_SEVERE BlamLogLevel::Severe
19 #define WSV_CRITICAL BlamLogLevel::Severe
26 #define WSV_INFO BlamLogLevel::Input
33 #define WSV_AIERR BlamLogLevel::AiError
36 #define WVIS_NONE BlamLogVisibility::Vis_None
37 #define WVIS_ALL BlamLogVisibility::All
38 #define WVIS_STDOUT_ONLY BlamLogVisibility::StdoutOnly
39 #define WVIS_FILE_ONLY BlamLogVisibility::FileOnly
40 #define WVIS_HTML_ONLY BlamLogVisibility::HTMLOnly
41 #define WVIS_TXT_ONLY BlamLogVisibility::TXTOnly
43 #define MAX_ERRORS_BEFORE_SUPRESSION 5
52 #define BL_LOGEVT(m) Blam::Logger::LogEvent(m);
59 #define BL_LOGEVT_ST(m, st) Blam::Logger::LogEvent(m, st);
66 #define BL_LOGEVT_SEV(m, st, sev) Blam::Logger::LogEvent(m, st, sev);
73 #define BL_LOGEVT_RGB(m, st, sev, r, g, b) Blam::Logger::LogEvent(m, st, sev, r, g, b);
160 bool log_ready =
false;
161 std::string timestamped_log_path;
171 HRESULT WriteLineToText(std::string file_path,
BlamLogMessage message);
181 HRESULT WriteLineToHTML(std::string file_path,
BlamLogMessage message);
377 BLAM void LogEvent(std::string message,
bool show_timestamp);
Namespace surrounding all major engine components.
Definition: blam_api.h:18
BlamReportType report_type
The report that the message is intended for.
Definition: logger.h:131
@ UIDebug
BlamReport file for all UI messages.
@ Input
Indicates that the user has executed a command from console.
@ TXTOnly
The message will only be written to the log file, if the file is in plain text format.
BLAM void AddMessage(BlamLogMessage message)
Adds a message to the queue.
Definition: queue.cpp:46
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:101
@ TagDebug
BlamReport file for all tag related messages.
@ Severe
Indicates a severe error that the engine cannot recover from.
Class representing a report file.
Definition: logger.h:157
@ HTMLOnly
The message will only be written to the log file, if the file is in HTML format.
BLAM void PrepareLogger()
Prepares the logger for use.
Definition: logger.cpp:16
@ AiError
Placeholder for the future, indicates an error with AI.
BlamReportType
Enumerator containing possible report types.
Definition: logger.h:117
@ Vis_None
The message will not be visible anywhere.
@ Warning
Indicates a warning message. Not something critical, but something that could cause unexpected behavi...
BLAM void PrepareTextLog(std::string report_filename)
Prepares the plain text log file for writing.
Definition: logger.cpp:116
@ color
Definition: render_model.h:12
BLAM std::vector< BlamLogMessage > * GetQueue()
Retrieves the current message queue.
Definition: queue.cpp:168
@ Error
Indicates an error that could cause engine instability.
void PrintStartupHeader()
Prints the startup header to the log.
Definition: report.cpp:153
BlamLogVisibility visibility
The visibility of the log message.
Definition: logger.h:141
BlamColor color
The overridden color information. Overrules any severity-based coloring.
Definition: logger.h:139
std::string message
The message contents.
Definition: logger.h:134
BLAM void LogEventForce(std::string message, BlamLogLevel severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:218
BLAM void LoadConsoleColors()
Loads console color configuration.
Definition: logger.cpp:220
void MarkAsReady()
Marks the report as ready for use.
Definition: report.cpp:229
bool override_color
Whether or not to override the message color.
Definition: logger.h:138
HRESULT WriteLineToFile(BlamLogMessage message)
Writes a line to the report's log file(s).
Definition: file_logging.cpp:11
@ 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.
Definition: socket.cpp:16
std::string report_filename
Definition: logger.h:184
#define WSV_NONE
Macro for 'None' log seveirty. Original pre-enum value was 0.
Definition: logger.h:15
BlamLogVisibility
Enumerator to specify log event visibility.
Definition: logger.h:104
BLAM void Flush()
Flushes the queue, causing all messages to be written to all places they are configured to do so.
Definition: queue.cpp:17
bool IsReady()
Whether or not the report is ready for use.
Definition: report.cpp:224
BlamLogLevel
Enumerator to specify log event severity.
Definition: logger.h:78
@ ShadersDebug
BlamReport file for shader messages.
BlamReportType report_type
Definition: logger.h:185
#define BLAM
Definition: logger.h:11
BLAM void SetLoggerReady()
Marks all reports as ready for use.
Definition: logger.cpp:212
@ 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:37
@ FileOnly
The message will only be written to the log file.
bool override_duplicate_limit
Whether or not this message should ignore the duplicate message limit.
Definition: logger.h:143
BLAM void CreateReportViewerPage()
Prepares the HTML file for the BlamReport Viewer.
Definition: logger.cpp:137
bool show_timestamp
Whether or not to show the timestamp of the message in the log file.
Definition: logger.h:136
BLAM std::string GetSeverityCSSClass(BlamLogLevel severity)
Gets the CSS class name for the specified severity.
Definition: logger.cpp:191
BLAM void PrepareHTMLLog(std::string report_filename)
Prepares the HTML log file.
Definition: logger.cpp:53
void Initialize()
Initializes the report to ensure it is ready for use.
Definition: report.cpp:14
int LogEvent(BlamLogMessage message)
Writes a message to the log file, console, and/or STDOUT depending on the message.
Definition: report.cpp:98
BLAM std::string PrepareHTMLTemplate(std::string log_title)
Prepares the contents of the default HTML log template.
Definition: logger.cpp:84
Structure to store log message data.
Definition: logger.h:129
BlamReport(BlamReportType type, std::string filename)
Initializes a new BlamReport.
Definition: logger.h:193
BLAM void LogEventAsync(std::string message)
Logs a message to the log and/or console asynchronously.
Definition: aliases.cpp:74
@ 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:133
Structure representing a color.
Definition: globals.h:20
BlamLogLevel severity
The message severity. Defaults to None.
Definition: logger.h:135
@ None
Indicates no severity, and is displayed with no formatting.
BLAM BlamReport * GetReport(BlamReportType type)
Retrieves report data with the specified type.
Definition: logger.cpp:40