Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
Blam::Logger Namespace Reference

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

Namespaces

 Queue
 Functions for the logger's message queue.
 

Functions

BLAM BlamReportGetReport (BlamReportType type)
 Retrieves report data with the specified type. More...
 
BLAM std::string GetLogLevelCSSClass (BlamLogLevel log_level)
 Gets the CSS class name for the specified log level. More...
 
BLAM void Initialize ()
 Prepares the logger for use. More...
 
BLAM void Shutdown ()
 Shuts down the logger. 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, BlamReportType report_type)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, bool show_timestamp, BlamLogLevel severity)
 Logs a message to the log and/or console. More...
 
BLAM void 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 LogEvent (std::string message, BlamLogLevel severity)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, BlamLogLevel severity, BlamReportType report_type)
 Logs a message to the log and/or console. More...
 
BLAM void LogEvent (std::string message, BlamLogLevel severity, BlamLogVisibility 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 (BlamLogMessage message)
 Logs a message to the log and/or console. More...
 
BLAM void LogEventForce (std::string message)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void LogEventForce (std::string message, BlamLogLevel 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, BlamLogLevel severity, BlamLogVisibility visibility)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void LogEventForce (std::string message, BlamLogLevel severity, BlamReportType report_type)
 Forcibly logs a message to the log and/or console. More...
 
BLAM void LogEventForce (BlamLogMessage message)
 Forcibly logs a message to the log and/or console. More...
 

Detailed Description

Namespace containing things related to the Blamite Logger.

Function Documentation

◆ GetLogLevelCSSClass()

std::string Blam::Logger::GetLogLevelCSSClass ( BlamLogLevel  log_level)

Gets the CSS class name for the specified log level.

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

◆ GetReport()

BlamReport * Blam::Logger::GetReport ( BlamReportType  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.

◆ Initialize()

void Blam::Logger::Initialize ( )

Prepares the logger for use.

This function will prepare all report files (according to configuration), create their files, and flush the queue to those files.

This function depends on configuration, and as such the engine configuration MUST be loaded before this is called.

◆ LogEvent() [1/10]

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

Logs a message to the log and/or console.

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

◆ LogEvent() [2/10]

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/10]

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/10]

void Blam::Logger::LogEvent ( std::string  message,
BlamLogLevel  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() [5/10]

void Blam::Logger::LogEvent ( std::string  message,
BlamLogLevel  severity,
BlamLogVisibility  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() [6/10]

void Blam::Logger::LogEvent ( std::string  message,
BlamLogLevel  severity,
BlamReportType  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.

◆ LogEvent() [7/10]

void Blam::Logger::LogEvent ( std::string  message,
BlamReportType  report_type 
)

Logs a message to the log and/or console.

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

◆ LogEvent() [8/10]

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() [9/10]

void Blam::Logger::LogEvent ( std::string  message,
bool  show_timestamp,
BlamLogLevel  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() [10/10]

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.

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.

◆ 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/6]

void Blam::Logger::LogEventForce ( BlamLogMessage  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/6]

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

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.

◆ LogEventForce() [3/6]

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() [4/6]

void Blam::Logger::LogEventForce ( std::string  message,
BlamLogLevel  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() [5/6]

void Blam::Logger::LogEventForce ( std::string  message,
BlamLogLevel  severity,
BlamLogVisibility  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() [6/6]

void Blam::Logger::LogEventForce ( std::string  message,
BlamLogLevel  severity,
BlamReportType  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.

◆ Shutdown()

void Blam::Logger::Shutdown ( )

Shuts down the logger.

No log messages should be generated after this is called.