Elaztek Developer Hub
Blamite Game Engine - blam!  00357.06.18.22.0809.blamite
The core library for the Blamite Game Engine.
logger.h File Reference
#include <Windows.h>
#include <vector>
#include <fstream>
#include <Strings/components/interface/logger/logger.h>
#include "components/resources/engine_globals/globals.h"

Go to the source code of this file.

Classes

struct  BlamLogMessage
 Structure to store log message data. More...
 
class  BlamReportFile
 Class representing a report file. More...
 
class  BlamReport
 Class representing a report file. More...
 

Namespaces

 Blam
 Namespace surrounding all major engine components.
 
 Blam::Logger
 Namespace containing things related to the Blamite Logger.
 
 Blam::Logger::Queue
 Functions for the logger's message queue.
 

Macros

#define DEFAULT_LOG_FILENAME   "debug"
 Specifies the default filename of a log file, without the extension. More...
 
#define BLAM
 
#define WVIS_NONE   BlamLogVisibility::None
 Macro for 'None' log visibility. Original pre-enum value was -1. More...
 
#define WVIS_ALL   BlamLogVisibility::All
 Macro for 'All' log visibility. Original pre-enum value was 0. More...
 
#define WVIS_STDOUT_ONLY   BlamLogVisibility::StdoutOnly
 Macro for 'StdoutOnly' log visibility. Original pre-enum value was 1. More...
 
#define WVIS_FILE_ONLY   BlamLogVisibility::FileOnly
 Macro for 'FileOnly' log visibility. Original pre-enum value was 2. More...
 
#define WVIS_HTML_ONLY   BlamLogVisibility::HTMLOnly
 Macro for 'HTMLOnly' log visibility. Original pre-enum value was 3. More...
 
#define WVIS_TXT_ONLY   BlamLogVisibility::TXTOnly
 Macro for 'TXTOnly' log visibility. Original pre-enum value was 4. More...
 

Enumerations

enum  BlamLogVisibility {
  BlamLogVisibility::None, BlamLogVisibility::All, BlamLogVisibility::StdoutOnly, BlamLogVisibility::FileOnly,
  BlamLogVisibility::HTMLOnly, BlamLogVisibility::TXTOnly
}
 Enumerator to specify log event visibility. More...
 
enum  BlamReportType {
  BlamReportType::Debug, BlamReportType::DebugFull, BlamReportType::TagDebug, BlamReportType::UIDebug,
  BlamReportType::ShadersDebug
}
 Enumerator containing possible report types. More...
 
enum  BlamLogFileFormat { BlamLogFileFormat::HTML, BlamLogFileFormat::PlainText, BlamLogFileFormat::Both }
 Enumerator containing possible log file formats. More...
 

Functions

BLAM void Blam::Logger::Queue::Initialize ()
 Initializes the logger queue. More...
 
BLAM void Blam::Logger::Queue::Shutdown ()
 Flushes the queue and may later be used to perform other shutdown tasks. More...
 
BLAM void Blam::Logger::Queue::Flush ()
 Flushes the queue, causing all messages to be written to all places they are configured to do so. More...
 
BLAM void Blam::Logger::Queue::AddMessage (BlamLogMessage message)
 Adds a message to the queue. More...
 
BLAM std::vector< BlamLogMessage > * Blam::Logger::Queue::GetQueue ()
 Retrieves the current message queue. More...
 
BLAM void Blam::Logger::Queue::FlushThread ()
 
BLAM void Blam::Logger::Queue::StartFlushThread ()
 
BLAM void Blam::Logger::Queue::StopFlushThread ()
 
BLAM BlamReportBlam::Logger::GetReport (BlamReportType type)
 Retrieves report data with the specified type. More...
 
BLAM std::vector< BlamReport * > Blam::Logger::GetReports ()
 Retrieves the list of reports. More...
 
BLAM std::string Blam::Logger::GetLogLevelCSSClass (BlamLogLevel log_level)
 Gets the CSS class name for the specified log level. More...
 
BLAM void Blam::Logger::Initialize ()
 Prepares the logger for use. More...
 
BLAM void Blam::Logger::Shutdown ()
 Shuts down the logger. More...
 
BLAM void Blam::Logger::LogEventAsync (std::string message)
 Logs a message to the log and/or console asynchronously. More...
 
BLAM void Blam::Logger::LogEvent (std::string message)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, bool show_timestamp)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, BlamReportType report_type)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, bool show_timestamp, BlamLogLevel severity)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, bool show_timestamp, BlamLogLevel severity, short r, short g, short b)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, BlamLogLevel severity)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, BlamLogLevel severity, BlamReportType report_type)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, BlamLogLevel severity, BlamLogVisibility visibility)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (std::string message, BlamColor color)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEvent (BlamLogMessage message)
 Logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEventForce (std::string message)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEventForce (std::string message, BlamLogLevel severity)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEventForce (std::string message, BlamColor color)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEventForce (std::string message, BlamLogLevel severity, BlamLogVisibility visibility)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEventForce (std::string message, BlamLogLevel severity, BlamReportType report_type)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void Blam::Logger::LogEventForce (BlamLogMessage message)
 Forcibly logs a message to the log and/or console. More...
 

Macro Definition Documentation

◆ BLAM

#define BLAM

◆ DEFAULT_LOG_FILENAME

#define DEFAULT_LOG_FILENAME   "debug"

Specifies the default filename of a log file, without the extension.

◆ WVIS_ALL

#define WVIS_ALL   BlamLogVisibility::All

Macro for 'All' log visibility. Original pre-enum value was 0.

◆ WVIS_FILE_ONLY

#define WVIS_FILE_ONLY   BlamLogVisibility::FileOnly

Macro for 'FileOnly' log visibility. Original pre-enum value was 2.

◆ WVIS_HTML_ONLY

#define WVIS_HTML_ONLY   BlamLogVisibility::HTMLOnly

Macro for 'HTMLOnly' log visibility. Original pre-enum value was 3.

◆ WVIS_NONE

#define WVIS_NONE   BlamLogVisibility::None

Macro for 'None' log visibility. Original pre-enum value was -1.

◆ WVIS_STDOUT_ONLY

#define WVIS_STDOUT_ONLY   BlamLogVisibility::StdoutOnly

Macro for 'StdoutOnly' log visibility. Original pre-enum value was 1.

◆ WVIS_TXT_ONLY

#define WVIS_TXT_ONLY   BlamLogVisibility::TXTOnly

Macro for 'TXTOnly' log visibility. Original pre-enum value was 4.

Enumeration Type Documentation

◆ BlamLogFileFormat

enum BlamLogFileFormat
strong

Enumerator containing possible log file formats.

Enumerator
HTML 

The log file will be written with an HTML format.

PlainText 

The log file will be written in a plain text (.txt) format.

Both 

The log file will be written as both an HTML document and a plain text document.

◆ BlamLogVisibility

enum BlamLogVisibility
strong

Enumerator to specify log event visibility.

Enumerator
None 

The message will not be visible anywhere.

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.

FileOnly 

The message will only be written to the log file.

HTMLOnly 

The message will only be written to the log file, if the file is in HTML format.

TXTOnly 

The message will only be written to the log file, if the file is in plain text format.

◆ BlamReportType

enum BlamReportType
strong

Enumerator containing possible report types.

Enumerator
Debug 

Default report file. Contains all log messages found in other reports, excluding debug_full.

DebugFull 

Similar to debug, but includes additional messages that would be hidden from debug.

TagDebug 

BlamReport file for all tag related messages.

UIDebug 

BlamReport file for all UI messages.

ShadersDebug 

BlamReport file for shader messages.