OpenTREP Logo  0.07.20
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
OPENTREP::Logger Class Reference

#include <opentrep/service/Logger.hpp>

Public Member Functions

template<typename T>
void log (const LOG::EN_LogLevel iLevel, const int iLineNumber, const std::string &iFileName, const T &iToBeLogged)
LOG::EN_LogLevel getLogLevel ()
std::ostream & getLogStream ()
void setLogParameters (const LOG::EN_LogLevel iLogLevel, std::ostream &ioLogStream)

Static Public Member Functions

static Logger & instance ()

Friends

class FacSupervisor

Detailed Description

Class managing the stream for logs.

Note that the error logs are seen as standard output logs, but with a higher level of visibility.

Definition at line 49 of file Logger.hpp.

Member Function Documentation

◆ log()

template<typename T>
void OPENTREP::Logger::log ( const LOG::EN_LogLevel iLevel,
const int iLineNumber,
const std::string & iFileName,
const T & iToBeLogged )
inline

Main log entry.

Definition at line 58 of file Logger.hpp.

◆ getLogLevel()

LOG::EN_LogLevel OPENTREP::Logger::getLogLevel ( )

Get the log level.

Definition at line 36 of file Logger.cpp.

References getLogLevel().

Referenced by getLogLevel().

◆ getLogStream()

std::ostream & OPENTREP::Logger::getLogStream ( )

Get the log stream.

Definition at line 41 of file Logger.cpp.

References getLogStream().

Referenced by getLogStream().

◆ setLogParameters()

void OPENTREP::Logger::setLogParameters ( const LOG::EN_LogLevel iLogLevel,
std::ostream & ioLogStream )

Set the logger parameters (level and stream).

Definition at line 47 of file Logger.cpp.

References setLogParameters().

Referenced by OPENTREP::logInit(), and setLogParameters().

◆ instance()

Logger & OPENTREP::Logger::instance ( )
static

Returns a current Logger instance.

Definition at line 54 of file Logger.cpp.

References OPENTREP::LOG::DEBUG, OPENTREP::FacSupervisor::instance(), and instance().

Referenced by instance(), and OPENTREP::logInit().

◆ FacSupervisor

friend class FacSupervisor
friend

Definition at line 51 of file Logger.hpp.

References FacSupervisor.

Referenced by FacSupervisor.


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