Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Appender Class Reference

Inheritance diagram for Appender:

ConsoleAppender NullAppender SocketAppender VersionIsolated::FileAppender List of all members.

Public Member Functions

uint getMask ()
char[] getName ()
void append (Event event)
 this ()
void setLayout (Layout layout)
Layout getLayout ()
void setNext (Appender next)
Appender getNext ()
void close ()

Static Protected Member Functions

static uint nextMask ()

Private Attributes

Appender next
Layout layout

Detailed Description

Base class for all Appenders. These objects are responsible for emitting messages sent to a particular logger. There may be more than one appender attached to any logger. The actual message is constructed by another class known as a Layout.

Definition at line 53 of file Appender.d.


Member Function Documentation

uint getMask  ) 
 

Return the mask used to identify this Appender. The mask is used to figure out whether an appender has already been invoked for a particular logger.

Reimplemented in ConsoleAppender, VersionIsolated::FileAppender, NullAppender, and SocketAppender.

Referenced by LoggerInstance::append().

char [] getName  ) 
 

Return the name of this Appender.

Reimplemented in ConsoleAppender, VersionIsolated::FileAppender, NullAppender, and SocketAppender.

void append Event  event  ) 
 

Append a message to the output.

Reimplemented in ConsoleAppender, VersionIsolated::FileAppender, NullAppender, and SocketAppender.

Referenced by LoggerInstance::append().

this  )  [inline]
 

Create an Appender and default its layout to SimpleLayout.

Reimplemented in ConsoleAppender, ConsoleAppender, VersionIsolated::FileAppender, VersionIsolated::FileAppender, NullAppender, NullAppender, and SocketAppender.

Definition at line 90 of file Appender.d.

References layout.

static uint nextMask  )  [inline, static, protected]
 

Static method to return a mask for identifying the Appender. Each Appender class should have a unique fingerprint so that we can figure out which ones have been invoked for a given event. A bitmask is a simple an efficient way to do that.

Definition at line 104 of file Appender.d.

Referenced by SocketAppender::this(), and NullAppender::this().

void setLayout Layout  layout  )  [inline]
 

Set the current layout to be that of the argument.

Definition at line 119 of file Appender.d.

Referenced by SocketAppender::this(), and NullAppender::this().

Layout getLayout  )  [inline]
 

Return the current Layout

Definition at line 130 of file Appender.d.

References layout.

void setNext Appender  next  )  [inline]
 

Attach another appender to this one

Definition at line 141 of file Appender.d.

Referenced by LoggerInstance::addAppender().

Appender getNext  )  [inline]
 

Return the next appender in the list

Definition at line 152 of file Appender.d.

References next.

Referenced by LoggerInstance::append().

void close  )  [inline]
 

Close this appender. This would be used for file, sockets, and such like.

Reimplemented in VersionIsolated::FileAppender, and SocketAppender.

Definition at line 164 of file Appender.d.


Member Data Documentation

Appender next [private]
 

Definition at line 55 of file Appender.d.

Referenced by getNext().

Layout layout [private]
 

Definition at line 56 of file Appender.d.

Referenced by getLayout(), and this().


The documentation for this class was generated from the following file:
Generated on Sat Dec 24 17:28:37 2005 for Mango by  doxygen 1.4.0