FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::Logger Class Reference

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. More...

#include <logger.h>

+ Collaboration diagram for FIFE::Logger:

Public Member Functions

 Logger (logmodule_t module)
 Creates new logger and associates it with given module. More...
 
 ~Logger ()
 Destructor. More...
 
void log (LogManager::LogLevel level, const std::string &msg)
 logs given message with given log level More...
 
void log (LogManager::LogLevel level, const LMsg &msg)
 logs given message with given log level. More...
 
logmodule_t getModule () const
 gets module where this logger is associated to More...
 

Private Attributes

logmodule_t m_module
 

Related Functions

(Note that these are not member functions.)

static Logger _log (LM_AUDIO)
 Logger to use for this source file. More...
 
static Logger _log (LM_AUDIO)
 Logger to use for this source file. More...
 
static Logger _log (LM_AUDIO)
 Logger to use for this source file. More...
 
static Logger _log (LM_AUDIO)
 Logger to use for this source file. More...
 
static Logger _log (LM_CONTROLLER)
 Logger to use for this source file. More...
 
static Logger _log (LM_AUDIO)
 Logger to use for this source file. More...
 
static Logger _log (LM_NATIVE_LOADERS)
 Logger to use for this source file. More...
 
static Logger _log (LM_NATIVE_LOADERS)
 Logger to use for this source file. More...
 
static Logger _log (LM_NATIVE_LOADERS)
 Logger to use for this source file. More...
 
static Logger _log (LM_NATIVE_LOADERS)
 Logger to use for this source file. More...
 
static Logger _log (LM_STRUCTURES)
 Logger to use for this source file. More...
 
static Logger _log (LM_FO_LOADERS)
 Logger to use for this source file. More...
 
static Logger _log (LM_VFS)
 Logger to use for this source file. More...
 
static Logger _log (LM_VFS)
 Logger to use for this source file. More...
 
static Logger _log (LM_VFS)
 Logger to use for this source file. More...
 
static Logger _log (LM_RESMGR)
 Logger to use for this source file. More...
 
static Logger _log (LM_CURSOR)
 Logger to use for this source file. More...
 
static Logger _log (LM_GUI)
 Logger to use for this source file. More...
 
static Logger _log (LM_RESMGR)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIDEO)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIDEO)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIDEO)
 Logger to use for this source file. More...
 
static Logger _log (LM_CAMERA)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEWVIEW)
 Logger to use for this source file. More...
 
static Logger _log (LM_VIEW)
 Logger to use for this source file. More...
 

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

◆ Logger()

FIFE::Logger::Logger ( logmodule_t  module)

Creates new logger and associates it with given module.

Definition at line 50 of file logger.cpp.

◆ ~Logger()

FIFE::Logger::~Logger ( )

Destructor.

Definition at line 54 of file logger.cpp.

Member Function Documentation

◆ getModule()

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

gets module where this logger is associated to

Definition at line 232 of file logger.h.

◆ log() [1/2]

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(), FIFE::LogManager::log(), and m_module.

◆ log() [2/2]

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(), FIFE::LogManager::log(), m_module, and FIFE::LMsg::str.

Friends And Related Function Documentation

◆ _log() [1/35]

static Logger _log ( LM_VFS  )
related

Logger to use for this source file.

◆ _log() [2/35]

static Logger _log ( LM_FO_LOADERS  )
related

Logger to use for this source file.

◆ _log() [3/35]

static Logger _log ( LM_AUDIO  )
related

Logger to use for this source file.

◆ _log() [4/35]

static Logger _log ( LM_CONTROLLER  )
related

Logger to use for this source file.

◆ _log() [5/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log [6/35]

Logger _log(LM_VIEW) ( LM_AUDIO  )
related

Logger to use for this source file.

◆ _log() [7/35]

static Logger _log ( LM_AUDIO  )
related

Logger to use for this source file.

◆ _log() [8/35]

static Logger _log ( LM_VFS  )
related

Logger to use for this source file.

◆ _log() [9/35]

static Logger _log ( LM_RESMGR  )
related

Logger to use for this source file.

◆ _log() [10/35]

static Logger _log ( LM_VIDEO  )
related

Logger to use for this source file.

◆ _log() [11/35]

static Logger _log ( LM_VIEW  )
related

Logger to use for this source file.

◆ _log() [12/35]

static Logger _log ( LM_RESMGR  )
related

Logger to use for this source file.

◆ _log() [13/35]

static Logger _log ( LM_AUDIO  )
related

Logger to use for this source file.

◆ _log() [14/35]

static Logger _log ( LM_VIDEO  )
related

Logger to use for this source file.

◆ _log() [15/35]

static Logger _log ( LM_VIDEO  )
related

Logger to use for this source file.

◆ _log() [16/35]

static Logger _log ( LM_CURSOR  )
related

Logger to use for this source file.

◆ _log() [17/35]

static Logger _log ( LM_VFS  )
related

Logger to use for this source file.

◆ _log() [18/35]

static Logger _log ( LM_AUDIO  )
related

Logger to use for this source file.

◆ _log() [19/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [20/35]

static Logger _log ( LM_STRUCTURES  )
related

Logger to use for this source file.

◆ _log() [21/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [22/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [23/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [24/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [25/35]

static Logger _log ( LM_NATIVE_LOADERS  )
related

Logger to use for this source file.

◆ _log() [26/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [27/35]

static Logger _log ( LM_NATIVE_LOADERS  )
related

Logger to use for this source file.

◆ _log() [28/35]

static Logger _log ( LM_GUI  )
related

Logger to use for this source file.

◆ _log() [29/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [30/35]

static Logger _log ( LM_NATIVE_LOADERS  )
related

Logger to use for this source file.

◆ _log() [31/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [32/35]

static Logger _log ( LM_CAMERA  )
related

Logger to use for this source file.

◆ _log() [33/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [34/35]

static Logger _log ( LM_VIEWVIEW  )
related

Logger to use for this source file.

◆ _log() [35/35]

static Logger _log ( LM_NATIVE_LOADERS  )
related

Logger to use for this source file.

Member Data Documentation

◆ m_module

logmodule_t FIFE::Logger::m_module
private

Definition at line 235 of file logger.h.

Referenced by log().


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