Logger Class Reference

A simple object for communicating log messages between objects/threads. More...

#include <logger.h>

List of all members.

Public Slots

void info (QString str)
 Send some info to this log.

Signals

void data (const QString &str)
 Emitted whenever anyone writes anything to this log.

Static Public Member Functions

static LoggergetLogger (QString logname=QString())
 Factory named-singleton manager.
static void myDebugHandler (QtMsgType type, const char *msg)

Protected Member Functions

 Logger (QString logname)
 You don't create them directly.


Detailed Description

A simple object for communicating log messages between objects/threads.

Inspired by the Logger class of the JDK 1.5, (which was inspired by Apache log4j).

Loggers have a signal data(QString) which can be connected to slots of other Qt objects - especially the LogWindow class, which is designed for it.

Author:
Alan Ezust
See also:
Command

Definition at line 21 of file logger.h.


Constructor & Destructor Documentation

Logger::Logger ( QString  logname  )  [inline, protected]

You don't create them directly.

Use Logger::getLogger(logname)

Definition at line 50 of file logger.h.

Referenced by getLogger().


Member Function Documentation

Logger * Logger::getLogger ( QString  logname = QString()  )  [static]

Factory named-singleton manager.

Creates or returns an existing Logger object whose name is logname. if logname is "debug", installs a QDebugHandler so that qDebug() messages go through this log also.

Definition at line 29 of file logger.cpp.

References Logger(), and myDebugHandler().

Referenced by Command::Command(), LogWindow::log(), and myDebugHandler().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Sep 30 01:15:44 2009 for oopapidocs by  doxygen 1.5.1