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
}
 log level More...
 

Public Member Functions

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

Static Public Member Functions

static Loggerget ()
 singleton accessor
 

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

log level

Enumerator
Debug 
Info 
Warning 
Error 
Critical 

Constructor & Destructor Documentation

◆ ~Logger()

SFCGAL::Logger::~Logger ( )
default

destructor

Member Function Documentation

◆ get()

auto SFCGAL::Logger::get ( )
static

singleton accessor

◆ log() [1/2]

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/2]

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()

auto SFCGAL::Logger::logLevel ( ) const

get the current log level

◆ setLogLevel()

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

set the log level