Utility class for logging messages to a file on the disk. More...
#include <DiskFileLogger.h>
Public Member Functions | |
DiskFileLogger (const std::string &path, const std::string &filename) | |
Constructor. More... | |
void | setPath (const std::string &path) |
Set the path to the file where messages are logged. More... | |
const std::string & | getPath () const |
Get the path to the file used for writing log messages. More... | |
void | setFile (const std::string &filename) |
Set the file where messages are logged. More... | |
const std::string & | getFile () const |
Get the name of the file used for writing log messages. More... | |
std::string | getFullPath () const |
Get the full path to the file used for writing log messages. More... | |
void | log (MessageType messageType, const std::string &msg) override |
Log message to a file on the disk. More... | |
Utility class for logging messages to a file on the disk.
Definition at line 36 of file DiskFileLogger.h.
ime::utility::DiskFileLogger::DiskFileLogger | ( | const std::string & | path, |
const std::string & | filename | ||
) |
Constructor.
path | path to the file where messages are logged |
filename | Name of the file where log messages are written |
const std::string & ime::utility::DiskFileLogger::getFile | ( | ) | const |
Get the name of the file used for writing log messages.
std::string ime::utility::DiskFileLogger::getFullPath | ( | ) | const |
Get the full path to the file used for writing log messages.
The full path includes the path and the name in the form : path/filename
const std::string & ime::utility::DiskFileLogger::getPath | ( | ) | const |
Get the path to the file used for writing log messages.
|
overridevirtual |
Log message to a file on the disk.
messageType | Log message type |
msg | Message to be logged |
This function will precede the log message with the date and time when the message was logged and message type.
Implements ime::utility::ILogger.
void ime::utility::DiskFileLogger::setFile | ( | const std::string & | filename | ) |
Set the file where messages are logged.
filename | Name of the file where log messages are written |
void ime::utility::DiskFileLogger::setPath | ( | const std::string & | path | ) |
Set the path to the file where messages are logged.
path | Path to the file where messages are logged |