OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
 
Loading...
Searching...
No Matches
Utils::Logger Class Referencefinal

#include <Logger.h>

Classes

struct  Message
 

Public Types

enum class  Level {
  None , Debug , Info , Warn ,
  Error
}
 
enum  OutputTypes { StdOut = 1 , StdErr = 2 , File = 4 }
 

Public Member Functions

 Logger ()
 
 ~Logger ()
 
Level logLevel () const
 
void logLevel (Level level)
 
void outputTypes (int outputTypes)
 
int outputTypes () const
 
std::string filename () const
 
void start ()
 
void stop ()
 
void log (Level level, const std::string &message, const std::string &file="", int line=-1)
 
void error (const std::string &message, const std::string &file="", int line=-1)
 
void warn (const std::string &message, const std::string &file="", int line=-1)
 
void info (const std::string &message, const std::string &file="", int line=-1)
 
void info (const std::stringstream &message, const std::string &file="", int line=-1)
 
void debug (const std::string &message, const std::string &file="", int line=-1)
 
void exception (const std::exception &e, const std::string &file="", int line=-1)
 
void exception (const std::exception &e, const std::string &message, const std::string &file="", int line=-1)
 
template<class T >
Logger & operator<< (const T &output)
 

Static Public Member Functions

static Logger * instance ()
 

Detailed Description

Definition at line 32 of file Logger.h.

Member Enumeration Documentation

◆ Level

enum class Utils::Logger::Level
strong
Enumerator
None 
Debug 
Info 
Warn 
Error 

Definition at line 35 of file Logger.h.

◆ OutputTypes

Enumerator
StdOut 
StdErr 
File 

Definition at line 63 of file Logger.h.

Constructor & Destructor Documentation

◆ Logger()

Utils::Logger::Logger ( )

Definition at line 12 of file Logger.cpp.

Here is the caller graph for this function:

◆ ~Logger()

Utils::Logger::~Logger ( )

Definition at line 26 of file Logger.cpp.

Member Function Documentation

◆ debug()

void Utils::Logger::debug ( const std::string &  message,
const std::string &  file = "",
int  line = -1 
)

Definition at line 85 of file Logger.cpp.

Here is the call graph for this function:

◆ error()

void Utils::Logger::error ( const std::string &  message,
const std::string &  file = "",
int  line = -1 
)

Definition at line 65 of file Logger.cpp.

Here is the call graph for this function:

◆ exception() [1/2]

void Utils::Logger::exception ( const std::exception &  e,
const std::string &  file = "",
int  line = -1 
)

Definition at line 90 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exception() [2/2]

void Utils::Logger::exception ( const std::exception &  e,
const std::string &  message,
const std::string &  file = "",
int  line = -1 
)

Definition at line 95 of file Logger.cpp.

◆ filename()

std::string Utils::Logger::filename ( ) const

Definition at line 55 of file Logger.cpp.

◆ info() [1/2]

void Utils::Logger::info ( const std::string &  message,
const std::string &  file = "",
int  line = -1 
)

Definition at line 75 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info() [2/2]

void Utils::Logger::info ( const std::stringstream &  message,
const std::string &  file = "",
int  line = -1 
)

Definition at line 80 of file Logger.cpp.

Here is the call graph for this function:

◆ instance()

Logger * Utils::Logger::instance ( )
static

Definition at line 31 of file Logger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log()

void Utils::Logger::log ( Level  level,
const std::string &  message,
const std::string &  file = "",
int  line = -1 
)

Definition at line 60 of file Logger.cpp.

Here is the caller graph for this function:

◆ logLevel() [1/2]

Logger::Level Utils::Logger::logLevel ( ) const

Definition at line 42 of file Logger.cpp.

Here is the caller graph for this function:

◆ logLevel() [2/2]

void Utils::Logger::logLevel ( Logger::Level  level)

Definition at line 43 of file Logger.cpp.

◆ operator<<()

template<class T >
Logger & Utils::Logger::operator<< ( const T &  output)

Definition at line 128 of file Logger.h.

Here is the call graph for this function:

◆ outputTypes() [1/2]

int Utils::Logger::outputTypes ( ) const

Definition at line 50 of file Logger.cpp.

Here is the caller graph for this function:

◆ outputTypes() [2/2]

void Utils::Logger::outputTypes ( int  outputTypes)

Definition at line 45 of file Logger.cpp.

Here is the call graph for this function:

◆ start()

void Utils::Logger::start ( )

Definition at line 120 of file Logger.cpp.

Here is the caller graph for this function:

◆ stop()

void Utils::Logger::stop ( )

Definition at line 126 of file Logger.cpp.

Here is the caller graph for this function:

◆ warn()

void Utils::Logger::warn ( const std::string &  message,
const std::string &  file = "",
int  line = -1 
)

Definition at line 70 of file Logger.cpp.

Here is the call graph for this function:

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