libosmscout  0.1
osmscout::Logger Class Referenceabstract

#include <Logger.h>

+ Inheritance diagram for osmscout::Logger:

Classes

class  Destination
 
class  Line
 

Public Types

enum  Level { DEBUG, INFO, WARN, ERROR }
 

Public Member Functions

Line Debug ()
 Start logging a line of debug output. More...
 
Line Error ()
 Start logging a line of error output. More...
 
Line Info ()
 Start logging a line of informational output. More...
 
 Logger ()=default
 
Line Warn ()
 Start logging a line of warning output (there is a potential problem, but the application could handle it) More...
 
virtual ~Logger ()=default
 

Protected Member Functions

virtual Line Log (Level level)=0
 The actual logging method, Debug(), Info(), Warn() and Error() are dispatching to. More...
 

Detailed Description

A logger is a special output stream. It can direct internal output to either the console, a file or some other (possibly OS specific) output sink. The actual destination is defined by passing a Destination instance to a Line instance.

Member Enumeration Documentation

◆ Level

Enumerator
DEBUG 
INFO 
WARN 
ERROR 

Constructor & Destructor Documentation

◆ Logger()

osmscout::Logger::Logger ( )
default

◆ ~Logger()

virtual osmscout::Logger::~Logger ( )
virtualdefault

Member Function Documentation

◆ Debug()

Logger::Line osmscout::Logger::Debug ( )

Start logging a line of debug output.

References DEBUG, and Log().

Referenced by osmscout::Log::Debug().

◆ Error()

Logger::Line osmscout::Logger::Error ( )

Start logging a line of error output.

References ERROR, and Log().

Referenced by osmscout::Log::Error().

◆ Info()

Logger::Line osmscout::Logger::Info ( )

Start logging a line of informational output.

References INFO, and Log().

Referenced by osmscout::Log::Info().

◆ Log()

virtual Line osmscout::Logger::Log ( Level  level)
protectedpure virtual

The actual logging method, Debug(), Info(), Warn() and Error() are dispatching to.

Implemented in osmscout::NoOpLogger, and osmscout::StreamLogger.

Referenced by Debug(), Error(), Info(), and Warn().

◆ Warn()

Logger::Line osmscout::Logger::Warn ( )

Start logging a line of warning output (there is a potential problem, but the application could handle it)

References Log(), and WARN.

Referenced by osmscout::Log::Warn().


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