#include <Logger.hpp>
|
| Logger () |
|
| Logger (const Logger &other)=delete |
|
| Logger (Logger &&other)=delete |
|
void | operator= (const Logger &other)=delete |
|
void | operator= (Logger &&other)=delete |
|
template<typename T > |
void | log (T msg) |
|
template<typename T > |
void | info (T msg) |
|
template<typename T > |
void | warn (T msg) |
|
template<typename T > |
void | error (T msg) |
|
template<typename T > |
void | log (unsigned int line, const char *file, T msg) |
|
template<typename T > |
void | info (unsigned int line, const char *file, T msg) |
|
template<typename T > |
void | warn (unsigned int line, const char *file, T msg) |
|
template<typename T > |
void | error (unsigned int line, const char *file, T msg) |
|
template<typename T > |
void | assertCheck (unsigned int line, const char *file, T assertion) |
|
template<typename T , typename STR > |
void | assertCheck (unsigned int line, const char *file, T assertion, STR msg) |
|
|
void | load (const std::string &applicationName) |
|
The main logger class for the game
Definition at line 40 of file Logger.hpp.
◆ Logger() [1/3]
Creates the logger object, this will not be initialized until load is called
Definition at line 41 of file Logger.cpp.
◆ Logger() [2/3]
Kale::Logger::Logger |
( |
const Logger & | other | ) |
|
|
delete |
Logger does not support copying/moving
◆ Logger() [3/3]
Kale::Logger::Logger |
( |
Logger && | other | ) |
|
|
delete |
Logger does not support copying/moving
◆ assertCheck() [1/2]
void Kale::Logger::assertCheck |
( |
unsigned int | line, |
|
|
const char * | file, |
|
|
T | assertion ) |
|
inline |
Logs an assertion to the console
- Parameters
-
line | The line number the log is being called from |
file | The name of the file the log is being called from |
assertion | The message to log |
Definition at line 295 of file Logger.hpp.
◆ assertCheck() [2/2]
template<typename
T , typename STR >
void Kale::Logger::assertCheck |
( |
unsigned int | line, |
|
|
const char * | file, |
|
|
T | assertion, |
|
|
STR | msg ) |
|
inline |
Logs an assertion to the console
- Parameters
-
line | The line number the log is being called from |
file | The name of the file the log is being called from |
assertion | The assertion to check |
msg | The message to log if the assertion fails |
Definition at line 307 of file Logger.hpp.
◆ error() [1/2]
void Kale::Logger::error |
( |
T | msg | ) |
|
|
inline |
Logs an error to the console
- Parameters
-
Definition at line 198 of file Logger.hpp.
◆ error() [2/2]
void Kale::Logger::error |
( |
unsigned int | line, |
|
|
const char * | file, |
|
|
T | msg ) |
|
inline |
Logs an error to the console
- Parameters
-
line | The line number the log is being called from |
file | The name of the file the log is being called from |
msg | The message to log |
Definition at line 275 of file Logger.hpp.
◆ getTimePrefix()
std::string Logger::getTimePrefix |
( |
| ) |
|
|
private |
Gets the time prefix for logging
- Returns
- The time prefix
Gets the time prefix for logging
- Returns
- the time prefix
Definition at line 90 of file Logger.cpp.
◆ info() [1/2]
void Kale::Logger::info |
( |
T | msg | ) |
|
|
inline |
Logs info to the console
- Parameters
-
Definition at line 166 of file Logger.hpp.
◆ info() [2/2]
void Kale::Logger::info |
( |
unsigned int | line, |
|
|
const char * | file, |
|
|
T | msg ) |
|
inline |
Logs info to the console
- Parameters
-
line | The line number the log is being called from |
file | The name of the file the log is being called from |
msg | The message to log |
Definition at line 235 of file Logger.hpp.
◆ load()
void Logger::load |
( |
const std::string & | applicationName | ) |
|
|
protected |
Loads and sets up the console
- Parameters
-
applicationName | The name of the application |
Definition at line 52 of file Logger.cpp.
◆ log() [1/2]
void Kale::Logger::log |
( |
T | msg | ) |
|
|
inline |
Logs output to the console
- Parameters
-
Definition at line 150 of file Logger.hpp.
◆ log() [2/2]
void Kale::Logger::log |
( |
unsigned int | line, |
|
|
const char * | file, |
|
|
T | msg ) |
|
inline |
Logs output to the console
- Parameters
-
line | The line number the log is being called from |
file | The name of the file the log is being called from |
msg | The message to log |
Definition at line 216 of file Logger.hpp.
◆ operator=() [1/2]
void Kale::Logger::operator= |
( |
const Logger & | other | ) |
|
|
delete |
Logger does not support copying/moving
◆ operator=() [2/2]
void Kale::Logger::operator= |
( |
Logger && | other | ) |
|
|
delete |
Logger does not support copying/moving
◆ warn() [1/2]
void Kale::Logger::warn |
( |
T | msg | ) |
|
|
inline |
Logs a warning to the console
- Parameters
-
Definition at line 182 of file Logger.hpp.
◆ warn() [2/2]
void Kale::Logger::warn |
( |
unsigned int | line, |
|
|
const char * | file, |
|
|
T | msg ) |
|
inline |
Logs a warning to the console
- Parameters
-
line | The line number the log is being called from |
file | The name of the file the log is being called from |
msg | The message to log |
Definition at line 255 of file Logger.hpp.
◆ Application
◆ logFile
std::ofstream Kale::Logger::logFile |
|
private |
The main log file for logging output to
Definition at line 96 of file Logger.hpp.
◆ mutex
std::mutex Kale::Logger::mutex |
|
private |
The mutex used for keeping the log file thread safe
Definition at line 101 of file Logger.hpp.
The documentation for this class was generated from the following files: