UMPS
The University of Utah Seismograph Stations Message Passing System.
UMPS::Logging::DailyFile Class Reference

A daily logger as implemented by the SpdLog library. More...

#include <dailyFile.hpp>

Inheritance diagram for UMPS::Logging::DailyFile:
Collaboration diagram for UMPS::Logging::DailyFile:

Public Member Functions

Cosntructors
 DailyFile ()
 Constructor.
 
 DailyFile (const DailyFile &logger)
 Copy constructor. More...
 
 DailyFile (DailyFile &&logger) noexcept
 Move construtor. More...
 
Operators
DailyFileoperator= (const DailyFile &logger)
 Copy assignment operator. More...
 
DailyFileoperator= (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.
 

Detailed Description

A daily logger as implemented by the SpdLog library.

DailyFile "dailyFile.hpp" "umps/logging/dailyFile.hpp"

Constructor & Destructor Documentation

◆ DailyFile() [1/2]

UMPS::Logging::DailyFile::DailyFile ( const DailyFile logger)

Copy constructor.

Parameters
[in]loggerThe logger class from which to initialize this class.

◆ DailyFile() [2/2]

UMPS::Logging::DailyFile::DailyFile ( DailyFile &&  logger)
noexcept

Move construtor.

Parameters
[in,out]loggerThe logger class from which to initialize this class. On exit, logger's behavior is undefined.

Member Function Documentation

◆ debug()

void UMPS::Logging::DailyFile::debug ( const std::string &  message)
overridevirtual

Writes a debug message.

Note
This requires getLevel() be >= Level::Debug.

Implements UMPS::Logging::ILog.

◆ error()

void UMPS::Logging::DailyFile::error ( const std::string &  message)
overridevirtual

Writes an error message.

Note
This requires getLevel() be >= Level::Error.

Implements UMPS::Logging::ILog.

◆ getLevel()

Level UMPS::Logging::DailyFile::getLevel ( ) const
overridevirtualnoexcept
Returns
Gets the logging level.

Implements UMPS::Logging::ILog.

◆ info()

void UMPS::Logging::DailyFile::info ( const std::string &  message)
overridevirtual

Writes an info message.

Note
This requires getLevel() be >= least Level::Info.

Implements UMPS::Logging::ILog.

◆ initialize()

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.

Parameters
[in]loggerNameThe logger name. For example, this could be the module name.
[in]fileNameThe name of the log file.
[in]levelThe logging level.
[in]hourRotate the log on this hour of the day. This should be in the range [0,23].
[in]minuteRotate the log on this minute of the hour. This should be in the range [0,59].
Exceptions
std::invalid_argumentif the root

◆ operator=() [1/2]

DailyFile& UMPS::Logging::DailyFile::operator= ( const DailyFile logger)

Copy assignment operator.

Parameters
[in]loggerThe logging class to copy to this.
Returns
A deep copy of the logger class.

◆ operator=() [2/2]

DailyFile& UMPS::Logging::DailyFile::operator= ( DailyFile &&  logger)
noexcept

Move assignment operator.

Parameters
[in,out]loggerThe logging class whose memory will be moved to this. On exit, logger's behavior is undefined.
Returns
The memory from logger moved to this.

◆ warn()

void UMPS::Logging::DailyFile::warn ( const std::string &  message)
overridevirtual

Writes a warning message.

Note
This requires getLevel() be >= Level::Warn.

Implements UMPS::Logging::ILog.


The documentation for this class was generated from the following file: