27 const std::string m_FileName;
28 std::ofstream m_OutStream;
80 bool log(
const std::string &message);
87 bool log(
const std::initializer_list<std::string> &messages);
A class for logging messages to different locations such as text files or databases.
Definition: Logger.h:15
Location
Enum representing the possible logging locations.
Definition: Logger.h:20
@ TEXT_FILE
Log messages to a text file.
Definition: Logger.h:22
@ DISABLED
Logging is disabled.
Definition: Logger.h:21
@ DATABASE
Log messages to a database.
Definition: Logger.h:23
bool log()
Logs an empty string.
Definition: Logger.cpp:43
std::string m_ClassName
The name of the class, intended for use by derived classes.
Definition: Logger.h:38
Logger()
Default constructor that initializes the logger with logging disabled.
Definition: Logger.cpp:3
~Logger()
Destructor that cleans up resources used by the logger.
Definition: Logger.cpp:22
Logger(const Logger &)=delete
Copy constructor is deleted to prevent copying of the logger.