SilentEye 0.4.1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

SilentEyeFramework::Logger Class Reference

Provides methods for multi-level logging into logfile and console. More...

#include <logger.h>

List of all members.

Public Types

enum  LogLevel { DEBUG_LEVEL = 1, INFO_LEVEL = 5, WARNING_LEVEL = 10, ERROR_LEVEL = 15 }

Public Member Functions

 Logger (QObject *parent=0)
 Logger (QString className)
 ~Logger ()
QString className () const
void setClassName (const QString &)
void debug (QString)
void info (QString)
void warning (QString)
void error (QString)

Static Public Member Functions

static void setFileName (const QString &)
static void setLevel (Logger::LogLevel=DEBUG_LEVEL)
static void setLevel (const QString &)

Private Member Functions

void init ()
void write (QString priority, QString text)

Private Attributes

QString m_className

Static Private Attributes

static QPointer< QFile > m_file
static int m_nbInstance = 0
static QString m_logFileName
static LogLevel m_level = DEBUG_LEVEL

Detailed Description

Provides methods for multi-level logging into logfile and console.

Definition at line 27 of file logger.h.


Member Enumeration Documentation

Enumerator:
DEBUG_LEVEL 
INFO_LEVEL 
WARNING_LEVEL 
ERROR_LEVEL 

Definition at line 30 of file logger.h.


Constructor & Destructor Documentation

SilentEyeFramework::Logger::Logger ( QObject *  parent = 0)

Definition at line 28 of file logger.cpp.

References m_className, and m_nbInstance.

SilentEyeFramework::Logger::Logger ( QString  className)

Definition at line 37 of file logger.cpp.

References className(), m_className, and m_nbInstance.

SilentEyeFramework::Logger::~Logger ( )

Definition at line 54 of file logger.cpp.

References m_file, and m_nbInstance.


Member Function Documentation

QString SilentEyeFramework::Logger::className ( ) const

Definition at line 62 of file logger.cpp.

References m_className.

Referenced by Logger().

void SilentEyeFramework::Logger::debug ( QString  text)

Definition at line 80 of file logger.cpp.

References DEBUG_LEVEL, m_level, and write().

Referenced by SilentEye::ModuleManager::load(), SilentEye::ModuleManager::loadPlugin(), and main().

void SilentEyeFramework::Logger::error ( QString  text)

Definition at line 98 of file logger.cpp.

References ERROR_LEVEL, m_level, and write().

void SilentEyeFramework::Logger::info ( QString  text)

Definition at line 86 of file logger.cpp.

References INFO_LEVEL, m_level, and write().

Referenced by SilentEye::ModuleManager::loadPlugin().

void SilentEyeFramework::Logger::init ( ) [private]

Definition at line 43 of file logger.cpp.

References m_file, and SilentEyeFramework::m_fileName.

Referenced by write().

void SilentEyeFramework::Logger::setClassName ( const QString &  name)

Definition at line 67 of file logger.cpp.

References m_className.

void SilentEyeFramework::Logger::setFileName ( const QString &  name) [static]

Definition at line 104 of file logger.cpp.

References SilentEyeFramework::m_fileName.

Referenced by main().

void SilentEyeFramework::Logger::setLevel ( const QString &  level) [static]

Definition at line 114 of file logger.cpp.

References DEBUG_LEVEL, ERROR_LEVEL, INFO_LEVEL, m_level, and WARNING_LEVEL.

void SilentEyeFramework::Logger::setLevel ( Logger::LogLevel  level = DEBUG_LEVEL) [static]

Definition at line 109 of file logger.cpp.

References m_level.

Referenced by main().

void SilentEyeFramework::Logger::warning ( QString  text)
void SilentEyeFramework::Logger::write ( QString  priority,
QString  text 
) [private]

Definition at line 72 of file logger.cpp.

References init(), m_className, and m_file.

Referenced by debug(), error(), info(), and warning().


Member Data Documentation

Definition at line 37 of file logger.h.

Referenced by className(), Logger(), setClassName(), and write().

QPointer< QFile > SilentEyeFramework::Logger::m_file [static, private]

Definition at line 33 of file logger.h.

Referenced by init(), write(), and ~Logger().

Logger::LogLevel SilentEyeFramework::Logger::m_level = DEBUG_LEVEL [static, private]

Definition at line 36 of file logger.h.

Referenced by debug(), error(), info(), setLevel(), and warning().

QString SilentEyeFramework::Logger::m_logFileName [static, private]

Definition at line 35 of file logger.h.

int SilentEyeFramework::Logger::m_nbInstance = 0 [static, private]

Definition at line 34 of file logger.h.

Referenced by Logger(), and ~Logger().


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