SFCGAL  1.3.0
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 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...
 

Detailed Description

[Singleton]Logger class

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

Member Enumeration Documentation

log level

Enumerator
Debug 
Info 
Warning 
Error 
Critical 

Constructor & Destructor Documentation

SFCGAL::Logger::~Logger ( )

destructor

Member Function Documentation

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

singleton accessor

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)
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)
const Logger::Level & SFCGAL::Logger::logLevel ( ) const

get the current log level

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

set the log level