FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE::Logger Class Reference

#include <logger.h>

Collaboration diagram for FIFE::Logger:
Collaboration graph

Public Member Functions

 Logger (logmodule_t module)
 
 ~Logger ()
 
void log (LogManager::LogLevel level, const std::string &msg)
 
void log (LogManager::LogLevel level, const LMsg &msg)
 
logmodule_t getModule () const
 

Detailed Description

Create a Logger instance to communicate with LogManager Logger stores information about the current module thus reducing the typing needed for individual traces Common way of doing things is to instantiate a static Logger on top of .cpp file and then use that in .cpp-file's methods

Definition at line 211 of file logger.h.

Constructor & Destructor Documentation

FIFE::Logger::Logger ( logmodule_t  module)

Creates new logger and associates it with given module

Definition at line 50 of file logger.cpp.

FIFE::Logger::~Logger ( )

Destructor

Definition at line 54 of file logger.cpp.

Member Function Documentation

logmodule_t FIFE::Logger::getModule ( ) const
inline

gets module where this logger is associated to

Definition at line 232 of file logger.h.

void FIFE::Logger::log ( LogManager::LogLevel  level,
const std::string &  msg 
)

logs given message with given log level

Definition at line 57 of file logger.cpp.

References FIFE::LogManager::instance(), and FIFE::LogManager::log().

void FIFE::Logger::log ( LogManager::LogLevel  level,
const LMsg msg 
)

logs given message with given log level. Message is wrapped into LMsg instance for easy formatting

Definition at line 61 of file logger.cpp.

References FIFE::LogManager::instance(), and FIFE::LogManager::log().


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