DotNameLib
Loading...
Searching...
No Matches
dotnamecpp::logging::NullLogger Class Reference

#include <NullLogger.hpp>

Inheritance diagram for dotnamecpp::logging::NullLogger:
Collaboration diagram for dotnamecpp::logging::NullLogger:

Public Member Functions

void debug (const std::string &, const std::string &="") override
 Log a debug message.
void info (const std::string &, const std::string &="") override
 Log an info message.
void warning (const std::string &, const std::string &="") override
 Log a warning message.
void error (const std::string &, const std::string &="") override
 Log an error message.
void critical (const std::string &, const std::string &="") override
 Log a critical message.
void setLevel (Level) override
 Set the Level object.
Level getLevel () const override
 Get the Level object.
void setAppPrefix (const std::string &) override
 Set the application prefix for log messages.
std::string getAppPrefix () const override
 Get the App Prefix object.
bool enableFileLogging (const std::string &) override
 Enable logging to a file.
void disableFileLogging () override
 Disable logging to a file.
Public Member Functions inherited from dotnamecpp::logging::ILogger
 ILogger ()=default
virtual ~ILogger ()=default
LogStream stream (Level level, const std::string &caller="")
 Create a LogStream for streaming log messages.
LogStream debugStream (const std::string &caller="")
 Create a LogStream for streaming debug messages.
LogStream infoStream (const std::string &caller="")
 Create a LogStream for streaming info messages.
LogStream warningStream (const std::string &caller="")
 Create a LogStream for streaming warning messages.
LogStream errorStream (const std::string &caller="")
 Create a LogStream for streaming error messages.
LogStream criticalStream (const std::string &caller="")
 Create a LogStream for streaming critical messages.
template<typename... Args>
void debugFmt (const std::string &format, Args &&...args)
 Create a formatted debug message.
template<typename... Args>
void infoFmt (const std::string &format, Args &&...args)
 Create a formatted info message.
template<typename... Args>
void warningFmt (const std::string &format, Args &&...args)
 Create a formatted warning message.
template<typename... Args>
void errorFmt (const std::string &format, Args &&...args)
 Create a formatted error message.
template<typename... Args>
void criticalFmt (const std::string &format, Args &&...args)
 Create a formatted critical message.

Member Function Documentation

◆ critical()

void dotnamecpp::logging::NullLogger::critical ( const std::string & message,
const std::string & caller = "" )
inlineoverridevirtual

Log a critical message.

Parameters
message
caller

Implements dotnamecpp::logging::ILogger.

◆ debug()

void dotnamecpp::logging::NullLogger::debug ( const std::string & message,
const std::string & caller = "" )
inlineoverridevirtual

Log a debug message.

Parameters
message
caller

Implements dotnamecpp::logging::ILogger.

◆ disableFileLogging()

void dotnamecpp::logging::NullLogger::disableFileLogging ( )
inlineoverridevirtual

Disable logging to a file.

Implements dotnamecpp::logging::ILogger.

◆ enableFileLogging()

bool dotnamecpp::logging::NullLogger::enableFileLogging ( const std::string & filename)
inlineoverridevirtual

Enable logging to a file.

Parameters
filename
Returns
true
false

Implements dotnamecpp::logging::ILogger.

◆ error()

void dotnamecpp::logging::NullLogger::error ( const std::string & message,
const std::string & caller = "" )
inlineoverridevirtual

Log an error message.

Parameters
message
caller

Implements dotnamecpp::logging::ILogger.

◆ getAppPrefix()

std::string dotnamecpp::logging::NullLogger::getAppPrefix ( ) const
inlineoverridevirtual

Get the App Prefix object.

Returns
std::string

Implements dotnamecpp::logging::ILogger.

◆ getLevel()

Level dotnamecpp::logging::NullLogger::getLevel ( ) const
inlineoverridevirtual

Get the Level object.

Returns
Level

Implements dotnamecpp::logging::ILogger.

◆ info()

void dotnamecpp::logging::NullLogger::info ( const std::string & message,
const std::string & caller = "" )
inlineoverridevirtual

Log an info message.

Parameters
message
caller

Implements dotnamecpp::logging::ILogger.

◆ setAppPrefix()

void dotnamecpp::logging::NullLogger::setAppPrefix ( const std::string & prefix)
inlineoverridevirtual

Set the application prefix for log messages.

Parameters
prefix

Implements dotnamecpp::logging::ILogger.

◆ setLevel()

void dotnamecpp::logging::NullLogger::setLevel ( Level level)
inlineoverridevirtual

Set the Level object.

Parameters
level

Implements dotnamecpp::logging::ILogger.

◆ warning()

void dotnamecpp::logging::NullLogger::warning ( const std::string & message,
const std::string & caller = "" )
inlineoverridevirtual

Log a warning message.

Parameters
message
caller

Implements dotnamecpp::logging::ILogger.


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