preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
precice::logging::Logger Class Reference

This class provides a lightweight logger. More...

#include <Logger.hpp>

Collaboration diagram for precice::logging::Logger:
[legend]

Classes

class  LoggerImpl
 

Public Member Functions

 Logger (std::string_view module)
 
 Logger (const Logger &other)
 Implements a deep copy of the implementation.
 
 Logger (Logger &&other) noexcept
 
Loggeroperator= (Logger other)
 
 ~Logger ()
 This is required for the std::unique_ptr.
 
void swap (Logger &other) noexcept
 
Logging operations
void error (LogLocation loc, std::string_view mess) noexcept
 
void warning (LogLocation loc, std::string_view mess) noexcept
 
void info (LogLocation loc, std::string_view mess) noexcept
 
void debug (LogLocation loc, std::string_view mess) noexcept
 
void trace (LogLocation loc, std::string_view mess) noexcept
 

Private Attributes

std::unique_ptr< LoggerImpl_impl
 Pimpl to the logger implementation.
 

Detailed Description

This class provides a lightweight logger.

Definition at line 16 of file Logger.hpp.

Constructor & Destructor Documentation

◆ Logger() [1/3]

precice::logging::Logger::Logger ( std::string_view module)
explicit

Creates a logger for a given module.

Parameters
[in]thename of the module

Definition at line 128 of file Logger.cpp.

◆ Logger() [2/3]

precice::logging::Logger::Logger ( const Logger & other)

Implements a deep copy of the implementation.

Definition at line 135 of file Logger.cpp.

◆ Logger() [3/3]

precice::logging::Logger::Logger ( Logger && other)
defaultnoexcept

◆ ~Logger()

precice::logging::Logger::~Logger ( )
default

This is required for the std::unique_ptr.

Member Function Documentation

◆ debug()

void precice::logging::Logger::debug ( LogLocation loc,
std::string_view mess )
noexcept

Definition at line 181 of file Logger.cpp.

◆ error()

void precice::logging::Logger::error ( LogLocation loc,
std::string_view mess )
noexcept

Definition at line 157 of file Logger.cpp.

◆ info()

void precice::logging::Logger::info ( LogLocation loc,
std::string_view mess )
noexcept

Definition at line 173 of file Logger.cpp.

◆ operator=()

Logger & precice::logging::Logger::operator= ( Logger other)

Definition at line 142 of file Logger.cpp.

Here is the call graph for this function:

◆ swap()

void precice::logging::Logger::swap ( Logger & other)
noexcept

Definition at line 148 of file Logger.cpp.

◆ trace()

void precice::logging::Logger::trace ( LogLocation loc,
std::string_view mess )
noexcept

Definition at line 189 of file Logger.cpp.

◆ warning()

void precice::logging::Logger::warning ( LogLocation loc,
std::string_view mess )
noexcept

Definition at line 165 of file Logger.cpp.

Member Data Documentation

◆ _impl

std::unique_ptr<LoggerImpl> precice::logging::Logger::_impl
private

Pimpl to the logger implementation.

Definition at line 44 of file Logger.hpp.


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