libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
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. More...
 
Line Error ()
 Start logging a line of error output. More...
 
Line Info ()
 Start logging a line of informational output. More...
 
 Logger ()
 
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

Enumerator
DEBUG 
INFO 
WARN 
ERROR 

Constructor & Destructor Documentation

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

Member Function Documentation

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

Start logging a line of debug output.

References DEBUG, and Log().

Referenced by osmscout::Log::Debug(), osmscout::Log::Error(), osmscout::Log::Info(), and osmscout::Log::Warn().

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

Start logging a line of error output.

References ERROR, and Log().

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

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

Start logging a line of informational output.

References INFO, and Log().

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

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

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

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

Referenced by Debug(), Error(), Info(), and 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: