SPH
Public Member Functions | List of all members
MultiLogger Class Reference

Class holding multiple loggers and writing messages to all of them. More...

#include <Logger.h>

Inheritance diagram for MultiLogger:
ILogger Polymorphic Noncopyable

Public Member Functions

Size getLoggerCnt () const
 
void add (AutoPtr< ILogger > &&logger)
 
virtual void writeString (const std::string &s) override
 Logs a string message. More...
 
- Public Member Functions inherited from ILogger
template<typename... TArgs>
void write (TArgs &&... args)
 Creates and logs a message by concatenating arguments. More...
 
void setPrecision (const Size newPrecision)
 Changes the precision of printed numbers. More...
 
void setScientific (const bool newScientific)
 Sets/unsets scientific notation. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()=default
 
 Noncopyable (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (const Noncopyable &)=delete
 
Noncopyableoperator= (Noncopyable &&)=default
 

Detailed Description

Class holding multiple loggers and writing messages to all of them.

The objects is the owner of loggers.

Definition at line 197 of file Logger.h.

Member Function Documentation

◆ add()

void MultiLogger::add ( AutoPtr< ILogger > &&  logger)
inline

Definition at line 206 of file Logger.h.

◆ getLoggerCnt()

Size MultiLogger::getLoggerCnt ( ) const
inline

Definition at line 202 of file Logger.h.

◆ writeString()

virtual void MultiLogger::writeString ( const std::string &  s)
inlineoverridevirtual

Logs a string message.

Todo:
different types (log, warning, error, ...) and levels of verbosity

Implements ILogger.

Definition at line 210 of file Logger.h.


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