![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
#include <DebugHandler.hpp>
Public Types | |
enum | Severity { Severity::Error, Severity::Warning, Severity::Info, Severity::Diagnostic, Severity::__Always } |
Public Member Functions | |
bool | isConsoleEnabled () |
Check if the console is enabled. More... | |
void | setEnabled (const bool enabled) |
Enable/disable the console. More... | |
void | setVerbosity (const Severity severity) |
Set the verbosity level. More... | |
Severity | getSeverity () const |
Get the verbosity level. More... | |
void | setReduceSpam (const bool set) |
Set the reduce spam flag. More... | |
void | setDebuggerOutput (const bool set) |
Set debugger logger attachment. More... | |
void | setFileLogging (const bool set) |
Enable/disable file logging. More... | |
bool | fileLoggingEnabled () const |
Check if file logging is enabled. More... | |
std::recursive_mutex & | getMutex () |
Get the debug handler mutex. More... | |
DebugHandler & | operator<< (const Severity severity) |
Operator for setting the severity level for the next output string. More... | |
DebugHandler & | operator<< (std::basic_ostream< char, std::char_traits< char >> &(*)(std::basic_ostream< char, std::char_traits< char >> &)) |
Flushes the stream using std::endl. More... | |
template<typename T > | |
DebugHandler & | operator<< (const T &data) |
An operator for inputting data into the stream. More... | |
Static Public Member Functions | |
static DebugHandler & | getInstance () |
Get the DebugHandler instance. More... | |
Definition at line 88 of file DebugHandler.hpp.
|
strong |
The severity levels
Enumerator | |
---|---|
Error |
Error severity (0) |
Warning |
Warning severity (1) |
Info |
Info severity (2) |
Diagnostic |
Diagnostic severity (3) |
__Always |
For internal functionality, do not use. |
Definition at line 100 of file DebugHandler.hpp.
bool jop::DebugHandler::fileLoggingEnabled | ( | ) | const |
Check if file logging is enabled.
|
static |
Get the DebugHandler instance.
std::recursive_mutex& jop::DebugHandler::getMutex | ( | ) |
Get the debug handler mutex.
You need to use this only if you're not using the pre-defined debug macros.
Severity jop::DebugHandler::getSeverity | ( | ) | const |
Get the verbosity level.
bool jop::DebugHandler::isConsoleEnabled | ( | ) |
Check if the console is enabled.
DebugHandler& jop::DebugHandler::operator<< | ( | const Severity | severity | ) |
Operator for setting the severity level for the next output string.
severity | The severity level |
DebugHandler& jop::DebugHandler::operator<< | ( | std::basic_ostream< char, std::char_traits< char >> & | *)(std::basic_ostream< char, std::char_traits< char >> & | ) |
Flushes the stream using std::endl.
DebugHandler& jop::DebugHandler::operator<< | ( | const T & | data | ) |
An operator for inputting data into the stream.
data | The data to be inserted |
void jop::DebugHandler::setDebuggerOutput | ( | const bool | set | ) |
Set debugger logger attachment.
When debugger output is enabled, all debug messages will be forwarded to the debugger console, e.g. the Visual Studio output window.
set | True to enable debugger output |
void jop::DebugHandler::setEnabled | ( | const bool | enabled | ) |
Enable/disable the console.
enabled | True to enable |
void jop::DebugHandler::setFileLogging | ( | const bool | set | ) |
Enable/disable file logging.
When file logging is enabled, text files will be created for all severity levels separately in the user directory.
set | True to enable |
void jop::DebugHandler::setReduceSpam | ( | const bool | set | ) |
Set the reduce spam flag.
set | True to enable |
void jop::DebugHandler::setVerbosity | ( | const Severity | severity | ) |
Set the verbosity level.
severity | The verbosity to set |