Log4Qt::ConsoleAppender Class Reference

The class ConsoleAppender appends to stdout or stderr. More...

#include <consoleappender.h>

Inheritance diagram for Log4Qt::ConsoleAppender:

Log4Qt::WriterAppender Log4Qt::AppenderSkeleton Log4Qt::Appender Log4Qt::LogObject

List of all members.

Public Types

enum  Target { STDOUT_TARGET, STDERR_TARGET }

Public Member Functions

 ConsoleAppender (QObject *pParent=0)
 ConsoleAppender (Layout *pLayout, QObject *pParent=0)
 ConsoleAppender (Layout *pLayout, const QString &rTarget, QObject *pParent=0)
 ConsoleAppender (Layout *pLayout, Target target, QObject *pParent=0)
virtual ~ConsoleAppender ()
QString target () const
void setTarget (const QString &rTarget)
void setTarget (Target target)
virtual void activateOptions ()
virtual void close ()

Protected Member Functions

void closeStream ()
virtual QDebug debug (QDebug &rDebug) const

Properties

QString target


Detailed Description

The class ConsoleAppender appends to stdout or stderr.

Note:
All the functions declared in this class are thread-safe.

The ownership and lifetime of objects of this class are managed. See Object ownership for more details.


Member Enumeration Documentation

The enum defines the possible output targets

See also:
target(), setTarget()
Enumerator:
STDOUT_TARGET  The output target is standard out.
STDERR_TARGET  The output target is standard error.


Constructor & Destructor Documentation

Log4Qt::ConsoleAppender::ConsoleAppender ( QObject *  pParent = 0  ) 

Log4Qt::ConsoleAppender::ConsoleAppender ( Layout pLayout,
QObject *  pParent = 0 
)

Log4Qt::ConsoleAppender::ConsoleAppender ( Layout pLayout,
const QString &  rTarget,
QObject *  pParent = 0 
)

Log4Qt::ConsoleAppender::ConsoleAppender ( Layout pLayout,
Target  target,
QObject *  pParent = 0 
)

Creates a ConsoleAppender with the layout pLayout, the target value specified by the target constant and the parent pParent.

virtual Log4Qt::ConsoleAppender::~ConsoleAppender (  )  [virtual]


Member Function Documentation

QString Log4Qt::ConsoleAppender::target (  )  const

void Log4Qt::ConsoleAppender::setTarget ( const QString &  rTarget  ) 

void Log4Qt::ConsoleAppender::setTarget ( Target  target  )  [inline]

Sets the target to the value specified by the target constant.

virtual void Log4Qt::ConsoleAppender::activateOptions (  )  [virtual]

Reimplemented from Log4Qt::WriterAppender.

virtual void Log4Qt::ConsoleAppender::close (  )  [virtual]

Reimplemented from Log4Qt::WriterAppender.

void Log4Qt::ConsoleAppender::closeStream (  )  [protected]

virtual QDebug Log4Qt::ConsoleAppender::debug ( QDebug &  rDebug  )  const [protected, virtual]

Writes all object member variables to the given debug stream rDebug and returns the stream.

ConsoleAppender(name:"CA" filter:0x0 isactive:true isclosed:false layout:"PL" target:"STDERR" referenceCount:1 threshold:"WARN_SET")

See also:
QDebug, operator<<(QDebug debug, const LogObject &rLogObject)

Reimplemented from Log4Qt::WriterAppender.


Property Documentation

QString Log4Qt::ConsoleAppender::target [read, write]

The property holds the target used by the appender.

The default is STDOUT_TARGET for the standard output.

See also:
Target, target(), setTarget()


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

Generated on Sun Mar 1 16:40:45 2009 for Log4Qt by  doxygen 1.5.6