Blamite Game Engine - blam!  00263.10.17.20.0001.blamite
The core library for the Blamite Game Engine.
Namespaces | Classes | Enumerations | Functions
Blam::Logger Namespace Reference

Namespace containing things related to the Blamite Logger. More...

Namespaces

 Internal
 Internal functions used by the logger.
 
 Queue
 Things relating to the logger's message Queue.
 

Classes

struct  LogMessage
 Structure to store log message data. More...
 
class  Report
 Class representing a report file. More...
 

Enumerations

enum  LogSeverity {
  None, Info, Error, Warning,
  Severe, Critical, AiError
}
 Enumerator to specify log event severity. More...
 
enum  LogVisibility {
  Vis_None, All, StdoutOnly, FileOnly,
  HTMLOnly, TXTOnly
}
 Enumerator to specify log event visibility. More...
 
enum  ReportType { Debug, DebugFull, TagDebug, UIDebug }
 Enumerator containing possible report types. More...
 

Functions

BLAM void SetLoggerReady ()
 Marks all reports as ready for use. More...
 
BLAM ReportGetReport (ReportType type)
 Retrieves report data with the specified type. More...
 
BLAM std::string GetSeverityCSSClass (LogSeverity severity)
 Gets the CSS class name for the specified severity. More...
 
BLAM void PrepareLogger ()
 Prepares the logger for use. More...
 
BLAM void LogEventAsync (std::string message)
 Logs a message to the log and/or console asynchronously. More...
 
BLAM void LogEvent (std::string message)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, bool show_timestamp)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, bool show_timestamp, Blam::Logger::LogSeverity severity)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, bool show_timestamp, Blam::Logger::LogSeverity severity, short r, short g, short b)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, LogSeverity severity)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, LogSeverity severity, ReportType report_type)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, LogSeverity severity, LogVisibility visibility)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, BlamColor color)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (Blam::Logger::LogMessage message)
 Logs a message to the log and/or console. More...
 
BLAM void LogEventForce (std::string message, LogSeverity severity)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void LogEventForce (std::string message, BlamColor color)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void LogEventForce (std::string message, LogSeverity severity, LogVisibility visibility)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void LogEventForce (std::string message, LogSeverity severity, ReportType report_type)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void LogEventForce (Blam::Logger::LogMessage message)
 Forcibly logs a message to the log and/or console. More...
 

Detailed Description

Namespace containing things related to the Blamite Logger.

Enumeration Type Documentation

◆ LogSeverity

Enumerator to specify log event severity.

Enumerator
None 

Indicates no severity, and is displayed with no formatting.

Info 

Indicates an informative message. Mostly redundant due to the None option.

Error 

Indicates an error that could cause engine instability.

Warning 

Indicates a warning message. Not something critical, but something that could cause unexpected behavior.

Severe 

Indicates a severe error that the engine most likely cannot recover from.

Critical 

Indicates a critical error that the engine cannot recover from.

AiError 

Placeholder for the future, indicates an error with AI.

◆ LogVisibility

Enumerator to specify log event visibility.

Enumerator
Vis_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.

◆ ReportType

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 

Report file for all tag related messages.

UIDebug 

Report file for all UI messages.

Function Documentation

◆ GetReport()

Blam::Logger::Report * Blam::Logger::GetReport ( ReportType  type)

Retrieves report data with the specified type.

Parameters
type- The report to get information for.
Returns
A pointer to the report if a report was found with the type, otherwise returns nullptr.

◆ GetSeverityCSSClass()

std::string Blam::Logger::GetSeverityCSSClass ( LogSeverity  severity)

Gets the CSS class name for the specified severity.

Parameters
severity- The severity to get a CSS class for.
Returns
The CSS class name for the specified severity. If no class was found, the return value will be sev_unknown_generic.

◆ LogEvent() [1/9]

void Blam::Logger::LogEvent ( Blam::Logger::LogMessage  message)

Logs a message to the log and/or console.

Parameters
message- The raw message data to write to the log.

◆ LogEvent() [2/9]

void Blam::Logger::LogEvent ( std::string  message)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.

◆ LogEvent() [3/9]

void Blam::Logger::LogEvent ( std::string  message,
BlamColor  color 
)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.
color- The color override of the message.

◆ LogEvent() [4/9]

void Blam::Logger::LogEvent ( std::string  message,
bool  show_timestamp 
)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.
show_timestamp- Whether or not to show the timestamp in the log file.

◆ LogEvent() [5/9]

void Blam::Logger::LogEvent ( std::string  message,
bool  show_timestamp,
Blam::Logger::LogSeverity  severity 
)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.
show_timestamp- Whether or not to show the timestamp in the log file.
severity- The severity of the message.

◆ LogEvent() [6/9]

void Blam::Logger::LogEvent ( std::string  message,
bool  show_timestamp,
Blam::Logger::LogSeverity  severity,
short  r,
short  g,
short  b 
)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.
show_timestamp- Whether or not to show the timestamp in the log file.
severity- The severity of the message.
r- The Red color override of the message.
g- The Green color override of the message.
b- The Blue color override of the message.

◆ LogEvent() [7/9]

void Blam::Logger::LogEvent ( std::string  message,
LogSeverity  severity 
)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.
severity- The severity of the message.

◆ LogEvent() [8/9]

void Blam::Logger::LogEvent ( std::string  message,
LogSeverity  severity,
LogVisibility  visibility 
)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.
severity- The severity of the message.
visibility- The visibility of the message.

◆ LogEvent() [9/9]

void Blam::Logger::LogEvent ( std::string  message,
LogSeverity  severity,
ReportType  report_type 
)

Logs a message to the log and/or console.

Parameters
message- The message to write to the log.
severity- The severity of the message.
report_type- The report that the message should be delivered to.

◆ LogEventAsync()

void Blam::Logger::LogEventAsync ( std::string  message)

Logs a message to the log and/or console asynchronously.

Parameters
message- The message to write to the log.

◆ LogEventForce() [1/5]

void Blam::Logger::LogEventForce ( Blam::Logger::LogMessage  message)

Forcibly logs a message to the log and/or console.

This will override the automatic duplicate message suppression.

Parameters
message- The raw message data to write to the log.

◆ LogEventForce() [2/5]

void Blam::Logger::LogEventForce ( std::string  message,
BlamColor  color 
)

Forcibly logs a message to the log and/or console.

This will override the automatic duplicate message suppression.

Parameters
message- The message to write to the log.
color- The color override of the message.

◆ LogEventForce() [3/5]

void Blam::Logger::LogEventForce ( std::string  message,
LogSeverity  severity 
)

Forcibly logs a message to the log and/or console.

This will override the automatic duplicate message suppression.

Parameters
message- The message to write to the log.
severity- The severity of the message.

◆ LogEventForce() [4/5]

void Blam::Logger::LogEventForce ( std::string  message,
LogSeverity  severity,
LogVisibility  visibility 
)

Forcibly logs a message to the log and/or console.

This will override the automatic duplicate message suppression.

Parameters
message- The message to write to the log.
severity- The severity of the message.
visibility- The visibility of the message.

◆ LogEventForce() [5/5]

void Blam::Logger::LogEventForce ( std::string  message,
LogSeverity  severity,
ReportType  report_type 
)

Forcibly logs a message to the log and/or console.

This will override the automatic duplicate message suppression.

Parameters
message- The message to write to the log.
severity- The severity of the message.
report_type- The report type this message should be written to.

◆ PrepareLogger()

void Blam::Logger::PrepareLogger ( )

Prepares the logger for use.

This file reads the engine configuration, so config should be loaded before calling this.

◆ SetLoggerReady()

void Blam::Logger::SetLoggerReady ( )

Marks all reports as ready for use.

Should be called AFTER script globals are loaded.