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

Appender Class Reference

Inheritance diagram for Appender:

ConsoleAppender 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

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 55 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, and VersionIsolated::FileAppender.

Referenced by LoggerInstance::append().

char [] getName  ) 
 

Return the name of this Appender.

Reimplemented in ConsoleAppender, and VersionIsolated::FileAppender.

void append Event  event  ) 
 

Append a message to the output.

Reimplemented in ConsoleAppender, and VersionIsolated::FileAppender.

Referenced by LoggerInstance::append().

this  )  [inline]
 

Create an Appender and default its layout to SimpleLayout.

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

Definition at line 92 of file Appender.d.

References layout.

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 106 of file Appender.d.

Referenced by ConsoleAppender::this().

void setLayout Layout  layout  )  [inline]
 

Set the current layout to be that of the argument.

Definition at line 121 of file Appender.d.

Referenced by ConsoleAppender::this().

Layout getLayout  )  [inline]
 

Return the current Layout

Definition at line 132 of file Appender.d.

References layout.

void setNext Appender  next  )  [inline]
 

Attach another appender to this one

Definition at line 143 of file Appender.d.

Referenced by LoggerInstance::addAppender().

Appender getNext  )  [inline]
 

Return the next appender in the list

Definition at line 154 of file Appender.d.

Referenced by LoggerInstance::append().

void close  )  [inline]
 

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

Reimplemented in VersionIsolated::FileAppender.

Definition at line 166 of file Appender.d.


Member Data Documentation

Appender next [private]
 

Definition at line 57 of file Appender.d.

Layout layout [private]
 

Definition at line 58 of file Appender.d.

Referenced by getLayout(), and this().


The documentation for this class was generated from the following file:
Generated on Sat Apr 9 20:11:35 2005 for Mango by doxygen 1.3.6