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

A naive logger that prints all messages to standard out and, in the case of errors, standard error. More...

#include <standardOut.hpp>

Inheritance diagram for UMPS::Logging::StandardOut:
Collaboration diagram for UMPS::Logging::StandardOut:

Public Member Functions

 StandardOut (Logging::Level level=Logging::Level::Info)
 Constructor.
 
 StandardOut (const StandardOut &logger)
 Copy constructor.
 
 StandardOut (StandardOut &&logger) noexcept
 Move constructor.
 
StandardOutoperator= (const StandardOut &logger)
 Copy assignment operator. More...
 
StandardOutoperator= (StandardOut &&logger) noexcept
 Move assignment operator. More...
 
 ~StandardOut () override
 Destructor.
 
void setLevel (Level level) noexcept
 Sets the logging level. More...
 
Level getLevel () const noexcept override
 
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...
 

Detailed Description

A naive logger that prints all messages to standard out and, in the case of errors, standard error.

StandardOut "stdout.hpp" "umps/logging/stdout.hpp"

Note
This class is not recommended for typical use.

Member Function Documentation

◆ debug()

void UMPS::Logging::StandardOut::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::StandardOut::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::StandardOut::getLevel ( ) const
overridevirtualnoexcept
Returns
Gets the logging level.

Implements UMPS::Logging::ILog.

◆ info()

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

Writes an info message.

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

Implements UMPS::Logging::ILog.

◆ operator=() [1/2]

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

Copy assignment operator.

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

◆ operator=() [2/2]

StandardOut& UMPS::Logging::StandardOut::operator= ( StandardOut &&  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.

◆ setLevel()

void UMPS::Logging::StandardOut::setLevel ( Level  level)
noexcept

Sets the logging level.

Parameters
[in]levelThe logging level.

◆ warn()

void UMPS::Logging::StandardOut::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: