OpenTREP Logo  0.07.11
C++ Open Travel Request Parsing Library
Logger.hpp File Reference
#include <cassert>
#include <sstream>
#include <string>
#include <boost/date_time.hpp>
#include <opentrep/OPENTREP_Types.hpp>

Go to the source code of this file.

Classes

class  OPENTREP::Logger
 

Namespaces

 OPENTREP
 

Macros

#define OPENTREP_LOG_CORE(iLevel, iToBeLogged)
 
#define OPENTREP_LOG_CRITICAL(iToBeLogged)    OPENTREP_LOG_CORE (OPENTREP::LOG::CRITICAL, iToBeLogged)
 
#define OPENTREP_LOG_ERROR(iToBeLogged)    OPENTREP_LOG_CORE (OPENTREP::LOG::ERROR, iToBeLogged)
 
#define OPENTREP_LOG_NOTIFICATION(iToBeLogged)    OPENTREP_LOG_CORE (OPENTREP::LOG::NOTIFICATION, iToBeLogged)
 
#define OPENTREP_LOG_WARNING(iToBeLogged)    OPENTREP_LOG_CORE (OPENTREP::LOG::WARNING, iToBeLogged)
 
#define OPENTREP_LOG_DEBUG(iToBeLogged)    OPENTREP_LOG_CORE (OPENTREP::LOG::DEBUG, iToBeLogged)
 
#define OPENTREP_LOG_VERBOSE(iToBeLogged)    OPENTREP_LOG_CORE (OPENTREP::LOG::VERBOSE, iToBeLogged)
 

Macro Definition Documentation

◆ OPENTREP_LOG_CORE

#define OPENTREP_LOG_CORE (   iLevel,
  iToBeLogged 
)
Value:
{ std::ostringstream ostr; ostr << iToBeLogged; \
OPENTREP::Logger::instance().log (iLevel, __LINE__, __FILE__, ostr.str()); }
static Logger & instance()
Definition: Logger.cpp:54
void log(const LOG::EN_LogLevel iLevel, const int iLineNumber, const std::string &iFileName, const T &iToBeLogged)
Definition: Logger.hpp:58

Definition at line 17 of file Logger.hpp.

◆ OPENTREP_LOG_CRITICAL

#define OPENTREP_LOG_CRITICAL (   iToBeLogged)     OPENTREP_LOG_CORE (OPENTREP::LOG::CRITICAL, iToBeLogged)

Definition at line 21 of file Logger.hpp.

◆ OPENTREP_LOG_ERROR

#define OPENTREP_LOG_ERROR (   iToBeLogged)     OPENTREP_LOG_CORE (OPENTREP::LOG::ERROR, iToBeLogged)

Definition at line 24 of file Logger.hpp.

◆ OPENTREP_LOG_NOTIFICATION

#define OPENTREP_LOG_NOTIFICATION (   iToBeLogged)     OPENTREP_LOG_CORE (OPENTREP::LOG::NOTIFICATION, iToBeLogged)

Definition at line 27 of file Logger.hpp.

◆ OPENTREP_LOG_WARNING

#define OPENTREP_LOG_WARNING (   iToBeLogged)     OPENTREP_LOG_CORE (OPENTREP::LOG::WARNING, iToBeLogged)

Definition at line 30 of file Logger.hpp.

◆ OPENTREP_LOG_DEBUG

#define OPENTREP_LOG_DEBUG (   iToBeLogged)     OPENTREP_LOG_CORE (OPENTREP::LOG::DEBUG, iToBeLogged)

Definition at line 33 of file Logger.hpp.

◆ OPENTREP_LOG_VERBOSE

#define OPENTREP_LOG_VERBOSE (   iToBeLogged)     OPENTREP_LOG_CORE (OPENTREP::LOG::VERBOSE, iToBeLogged)

Definition at line 36 of file Logger.hpp.