- Main Page
- Modules
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# Logger Class Reference

`#include <Logger.h>`

List of all members.

## Public Member Functions
virtual | ~Logger ()
void | log (int severity)
## Static Public Member Functions
static Logger * | getInstance ()
static void | setFilename (std::string filename)
static void | setLevel (int level)
static int | getLevel ()
## Static Public Attributes
static std::ostringstream | _oss
## Private Member Functions
| Logger ()
| Logger (const Logger &)
Logger & | operator= (const Logger &)
## Private Attributes
std::ofstream | _file
## Static Private Attributes
static Logger * | _instance = NULL
static std::string | _filename = "log.txt"
static int | _level = LOG_INFO

## Constructor & Destructor Documentation

Logger::~Logger | ( |  | ) | `[virtual]`

Logger::Logger | ( |  | ) | `[private]`

Logger::Logger | ( | const Logger & |  | ) | `[private]`

## Member Function Documentation

Logger * Logger::getInstance | ( |  | ) | `[static]`

Singleton instantiator

static int Logger::getLevel | ( |  | ) | `[inline, static]`

void Logger::log | ( | int | severity | ) |

Logs a message with set severity. The message is to be passed to the Logger::_oss object

Logger& Logger::operator= | ( | const Logger & |  | ) | `[private]`

static void Logger::setFilename | ( | std::string | filename | ) | `[inline, static]`

Sets the filename of the file to log to

static void Logger::setLevel | ( | int | level | ) | `[inline, static]`

Sets the threshhold level for messages to be logged

## Member Data Documentation

std::ofstream Logger::_file`[private]`

Log file deskriptor

std::string Logger::_filename = "log.txt"`[static, private]`

Filename of the log file

Logger * Logger::_instance = NULL`[static, private]`

The only Logger instance (is a singleton)

int Logger::_level = LOG_INFO`[static, private]`

Default logging threshhold

std::ostringstream Logger::_oss`[static]`

The object to pass the message to

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

- src/Logger.h
- src/Logger.cpp