A daily logger as implemented by the SpdLog library. More...
#include <dailyFile.hpp>
Public Member Functions | |
Cosntructors | |
DailyFile () | |
Constructor. | |
DailyFile (const DailyFile &logger) | |
Copy constructor. More... | |
DailyFile (DailyFile &&logger) noexcept | |
Move construtor. More... | |
Operators | |
DailyFile & | operator= (const DailyFile &logger) |
Copy assignment operator. More... | |
DailyFile & | operator= (DailyFile &&logger) noexcept |
Move assignment operator. More... | |
Initialization | |
void | initialize (const std::string &loggerName, const std::string &fileName, Level level=Level::Info, int hour=0, int minute=0) |
Initializes the logger. More... | |
Level | getLevel () const noexcept override |
Issue A Log Message | |
void | error (const std::string &message) override |
Writes an error message. More... | |
void | warn (const std::string &message) override |
Writes a warning message. More... | |
void | info (const std::string &message) override |
Writes an info message. More... | |
void | debug (const std::string &message) override |
Writes a debug message. More... | |
Destructors | |
~DailyFile () override | |
Destructor. | |
A daily logger as implemented by the SpdLog library.
DailyFile "dailyFile.hpp" "umps/logging/dailyFile.hpp"
UMPS::Logging::DailyFile::DailyFile | ( | const DailyFile & | logger | ) |
Copy constructor.
[in] | logger | The logger class from which to initialize this class. |
|
noexcept |
Move construtor.
[in,out] | logger | The logger class from which to initialize this class. On exit, logger's behavior is undefined. |
|
overridevirtual |
Writes a debug message.
getLevel()
be >= Level::Debug. Implements UMPS::Logging::ILog.
|
overridevirtual |
Writes an error message.
getLevel()
be >= Level::Error. Implements UMPS::Logging::ILog.
|
overridevirtualnoexcept |
Implements UMPS::Logging::ILog.
|
overridevirtual |
Writes an info message.
getLevel()
be >= least Level::Info. Implements UMPS::Logging::ILog.
void UMPS::Logging::DailyFile::initialize | ( | const std::string & | loggerName, |
const std::string & | fileName, | ||
Level | level = Level::Info , |
||
int | hour = 0 , |
||
int | minute = 0 |
||
) |
Initializes the logger.
[in] | loggerName | The logger name. For example, this could be the module name. |
[in] | fileName | The name of the log file. |
[in] | level | The logging level. |
[in] | hour | Rotate the log on this hour of the day. This should be in the range [0,23]. |
[in] | minute | Rotate the log on this minute of the hour. This should be in the range [0,59]. |
std::invalid_argument | if the root |
Copy assignment operator.
[in] | logger | The logging class to copy to this. |
Move assignment operator.
[in,out] | logger | The logging class whose memory will be moved to this. On exit, logger's behavior is undefined. |
|
overridevirtual |
Writes a warning message.
getLevel()
be >= Level::Warn. Implements UMPS::Logging::ILog.