OpenBlox
A game engine which provides a simple and easy to learn Lua API.
OB::OBLogger Class Reference

#include <OBLogger.h>

Public Member Functions

 OBLogger (OBEngine *eng)
 
 ~OBLogger ()
 
OBLogLevel getLogLevel ()
 
void setLogLevel (OBLogLevel logLevel)
 
void log (std::string message, OBLogLevel logLevel=OLL_Information)
 
void log (std::string message, std::string extra, OBLogLevel logLevel=OLL_Information)
 

Detailed Description

Logging utility class for the OpenBlox engine.

Author
John M. Harris, Jr.

Constructor & Destructor Documentation

◆ OBLogger()

OB::OBLogger::OBLogger ( OBEngine eng)

◆ ~OBLogger()

OB::OBLogger::~OBLogger ( )

Member Function Documentation

◆ getLogLevel()

OBLogLevel OB::OBLogger::getLogLevel ( )

Returns the current log level, corresponding to one of the items in the OBLogLevel enumeration class.

Returns
Current log level
Author
John M. Harris, Jr.

◆ log() [1/2]

void OB::OBLogger::log ( std::string  message,
OBLogLevel  logLevel = OLL_Information 
)

Prints a message to the log.

Parameters
messageText to be printed
logLevelLog level of this message. Defaults to OLL_Information.
Author
John M. Harris, Jr.

◆ log() [2/2]

void OB::OBLogger::log ( std::string  message,
std::string  extra,
OBLogLevel  logLevel = OLL_Information 
)

Prints a message to the log, with additional information.

Parameters
messageText to be printed
extraAdditional information, which will be printed after a " :".
logLevelLog level of this message. Defaults to OLL_Information.
Author
John M. Harris, Jr.

◆ setLogLevel()

void OB::OBLogger::setLogLevel ( OBLogLevel  logLevel)

Sets a new log level. The default is OLL_Information.

Parameters
logLevellog level
Author
John M. Harris, Jr.

The documentation for this class was generated from the following file: