SFCGAL  1.4.1
Public Types | Public Member Functions | Static Public Member Functions | List of all members
SFCGAL::Logger Class Reference

[Singleton]Logger class More...

#include <Log.h>

Public Types

enum  Level {
  Debug, Info, Warning, Error,
  Critical, Debug, Info, Warning,
  Error, Critical
}
 log level More...
 
enum  Level {
  Debug, Info, Warning, Error,
  Critical, Debug, Info, Warning,
  Error, Critical
}
 log level More...
 

Public Member Functions

 ~Logger ()
 destructor More...
 
void log (const Level &level, const boost::format &message, const std::string &filename="", const int &lineNumber=-1)
 log a message using boost format More...
 
void log (const Level &level, const std::string &message, const std::string &filename="", const int &lineNumber=-1)
 log a message More...
 
const LevellogLevel () const
 get the current log level More...
 
void setLogLevel (const Level &logLevel)
 set the log level More...
 
 ~Logger ()
 destructor More...
 
void log (const Level &level, const boost::format &message, const std::string &filename="", const int &lineNumber=-1)
 log a message using boost format More...
 
void log (const Level &level, const std::string &message, const std::string &filename="", const int &lineNumber=-1)
 log a message More...
 
const LevellogLevel () const
 get the current log level More...
 
void setLogLevel (const Level &logLevel)
 set the log level More...
 

Static Public Member Functions

static Loggerget ()
 singleton accessor More...
 
static Loggerget ()
 singleton accessor More...
 

Detailed Description

[Singleton]Logger class

Warning
saved_lines and co removed (dangerous for memory and could be done in a LogWriter).

Member Enumeration Documentation

◆ Level [1/2]

log level

Enumerator
Debug 
Info 
Warning 
Error 
Critical 
Debug 
Info 
Warning 
Error 
Critical 

◆ Level [2/2]

log level

Enumerator
Debug 
Info 
Warning 
Error 
Critical 
Debug 
Info 
Warning 
Error 
Critical 

Constructor & Destructor Documentation

◆ ~Logger() [1/2]

SFCGAL::Logger::~Logger ( )
default

destructor

◆ ~Logger() [2/2]

SFCGAL::Logger::~Logger ( )

destructor

Member Function Documentation

◆ get() [1/2]

auto SFCGAL::Logger::get ( )
static

singleton accessor

◆ get() [2/2]

static Logger* SFCGAL::Logger::get ( )
static

singleton accessor

◆ log() [1/4]

void SFCGAL::Logger::log ( const Level level,
const boost::format &  message,
const std::string &  filename = "",
const int &  lineNumber = -1 
)

log a message using boost format

Parameters
levelthe log level
messagethe message to log
filenamethe filename (optional)
lineNumberthe line number in the file (optional)

◆ log() [2/4]

void SFCGAL::Logger::log ( const Level level,
const boost::format &  message,
const std::string &  filename = "",
const int &  lineNumber = -1 
)

log a message using boost format

Parameters
levelthe log level
messagethe message to log
filenamethe filename (optional)
lineNumberthe line number in the file (optional)

◆ log() [3/4]

void SFCGAL::Logger::log ( const Level level,
const std::string &  message,
const std::string &  filename = "",
const int &  lineNumber = -1 
)

log a message

Parameters
levelthe log level
messagethe message to log
filenamethe filename (optional)
lineNumberthe line number in the file (optional)

◆ log() [4/4]

void SFCGAL::Logger::log ( const Level level,
const std::string &  message,
const std::string &  filename = "",
const int &  lineNumber = -1 
)

log a message

Parameters
levelthe log level
messagethe message to log
filenamethe filename (optional)
lineNumberthe line number in the file (optional)

◆ logLevel() [1/2]

auto SFCGAL::Logger::logLevel ( ) const

get the current log level

◆ logLevel() [2/2]

const Level& SFCGAL::Logger::logLevel ( ) const

get the current log level

◆ setLogLevel() [1/2]

void SFCGAL::Logger::setLogLevel ( const Level logLevel)

set the log level

◆ setLogLevel() [2/2]

void SFCGAL::Logger::setLogLevel ( const Level logLevel)

set the log level