libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::Logger Class Referenceabstract

A logger is a special output stream. More...

#include <Logger.h>

Inheritance diagram for osmscout::Logger:

Classes

class  Destination
 Abstract base class for printing log information to a specific output sink. More...
class  Line
 A log consists of a number of lines. More...

Public Types

enum  Level { DEBUG , INFO , WARN , ERROR }

Public Member Functions

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

Protected Member Functions

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

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

References Debug(), Error(), Info(), and Warn().

Member Function Documentation

◆ Debug()

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

Start logging a line of debug output.

References DEBUG, and Log().

Referenced by ~Logger().

◆ Error()

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

Start logging a line of error output.

References ERROR, and Log().

Referenced by ~Logger().

◆ Info()

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

Start logging a line of informational output.

References INFO, and Log().

Referenced by ~Logger().

◆ 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 ~Logger().


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