Tomographer  v5.4
Tomographer C++ Framework Documentation
loggers.h File Reference

(v5.4)

Utilities for logging messages. More...

#include <cstdio>
#include <cstdarg>
#include <string>
#include <sstream>
#include <iostream>
#include <functional>
#include <type_traits>
#include <map>
#include <boost/algorithm/string.hpp>
#include <tomographer/tools/cxxdefs.h>
#include <tomographer/tools/fmt.h>
#include <tomographer/tools/conststr.h>
+ Include dependency graph for loggers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Tomographer::Logger::LogLevel
 Object which stores a log level and can initialize from a string. More...
 
struct  Tomographer::Logger::StaticIsAtLeastOfSeverity< Level, BaseLevel >
 Helper for statically determining if Level is at least as severe as BaseLevel. More...
 
struct  Tomographer::Logger::DefaultLoggerTraits
 Default traits for Logger implementations. More...
 
struct  Tomographer::Logger::LoggerTraits< LoggerType >
 Traits template struct to be specialized for specific Logger implementations. More...
 
class  Tomographer::Logger::LoggerBase< Derived >
 Base logger class. More...
 
struct  Tomographer::Logger::LoggerTraits< FileLogger >
 Specialized Traits for FileLogger – see LoggerTraits. More...
 
class  Tomographer::Logger::FileLogger
 Simple logger class which logs everything into a given FILE pointer. More...
 
struct  Tomographer::Logger::LoggerTraits< VacuumLogger >
 Specialied Traits for VacuumLogger. See LoggerTraits<BaseLogger>. More...
 
class  Tomographer::Logger::VacuumLogger
 Logger that discards all messages. More...
 
struct  Tomographer::Logger::LoggerTraits< BufferLogger >
 Specialized Traits for BufferLogger – see LoggerTraits. More...
 
class  Tomographer::Logger::BufferLogger
 Log messages into an internal memory buffer. More...
 
class  Tomographer::Logger::MinimumSeverityLogger< BaseLogger, Level >
 Logger which statically discards any messages less important than a fixed severity. More...
 
struct  Tomographer::Logger::LoggerTraits< MinimumSeverityLogger< BaseLogger, Level > >
 Specialized Traits for MinimumSeverityLogger – see LoggerTraits. More...
 
class  Tomographer::Logger::MinimumSeverityLogger< BaseLogger, Level >
 Logger which statically discards any messages less important than a fixed severity. More...
 
class  Tomographer::Logger::OriginPrefixedLogger< BaseLogger >
 Logger which prepends to each origin string a fixed prefix. More...
 
struct  Tomographer::Logger::LoggerTraits< OriginPrefixedLogger< BaseLogger > >
 Specialized Traits for OriginPrefixedLogger – see LoggerTraits. More...
 
class  Tomographer::Logger::OriginPrefixedLogger< BaseLogger >
 Logger which prepends to each origin string a fixed prefix. More...
 
class  Tomographer::Logger::OriginFilteredLogger< BaseLogger >
 A logger which filters entries according to where they originated from. More...
 
struct  Tomographer::Logger::LoggerTraits< OriginFilteredLogger< BaseLogger > >
 Specialized Logger Traits for OriginFilteredLogger – see LoggerTraits. More...
 
class  Tomographer::Logger::OriginFilteredLogger< BaseLogger >
 A logger which filters entries according to where they originated from. More...
 
struct  Tomographer::Logger::LocalLoggerOriginSpec
 Tool to specify arguments to LocalLogger. More...
 
class  Tomographer::Logger::LocalLogger< BaseLoggerType_ >
 Local logger: avoid having to repeat origin at each emitted message. More...
 
struct  Tomographer::Logger::LoggerTraits< LocalLogger< BaseLoggerType_ > >
 Specialized Traits for LocalLogger. See LoggerTraits<BaseLoggerType_> More...
 
class  Tomographer::Logger::LocalLogger< BaseLoggerType_ >
 Local logger: avoid having to repeat origin at each emitted message. More...
 

Namespaces

 Tomographer
 Base namespace for the Tomographer project.
 
 Tomographer::Logger
 Tomographer's Logging Framework
 

Macros

#define TOMO_ORIGIN   Tomographer::Logger::tomo_internal::extractTomoOrigin(TOMO_FUNCTION)
 Use this as argument for a Tomographer::Logger::LocalLogger constructor . More...
 

Enumerations

enum  Tomographer::Logger::LogLevelCode
 Possible logging levels. More...
 

Functions

std::istreamTomographer::Logger::operator>> (std::istream &str, LogLevel &l)
 C++ input stream operator for LogLevel.
 
std::ostreamTomographer::Logger::operator<< (std::ostream &str, const LogLevel &l)
 C++ output stream operator for LogLevel.
 
bool Tomographer::Logger::isAtLeastOfSeverity (int level, int baselevel)
 Helper to compare severity levels. More...
 
template<typename BaseLoggerType >
LocalLogger< BaseLoggerType > Tomographer::Logger::makeLocalLogger (std::string origin_fn_name, BaseLoggerType &baselogger)
 Create a local logger. More...
 
template<typename BaseLoggerType >
LocalLogger< BaseLoggerType > Tomographer::Logger::makeLocalLogger (std::string origin_prefix, std::string glue, BaseLoggerType &baselogger)
 Create a local logger. More...
 
template<typename BaseLoggerType >
LocalLogger< BaseLoggerType > Tomographer::Logger::makeLocalLogger (const LocalLoggerOriginSpec &spec, BaseLoggerType &baselogger)
 Create a local logger. More...
 

Detailed Description

Utilities for logging messages.

Definition in file loggers.h.

Macro Definition Documentation

§ TOMO_ORIGIN

#define TOMO_ORIGIN   Tomographer::Logger::tomo_internal::extractTomoOrigin(TOMO_FUNCTION)

Use this as argument for a Tomographer::Logger::LocalLogger constructor .

Warning
TOMO_ORIGIN does not work inside C++11 lambda's.

Definition at line 1608 of file loggers.h.