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

Appender Class Reference

Inheritance diagram for Appender:

ConsoleAppender NullAppender VersionMango::FileAppender VersionMango::SocketAppender VersionMango::StdioAppender VersionMango::RollingFileAppender 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 52 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, VersionMango::FileAppender, NullAppender, VersionMango::RollingFileAppender, VersionMango::SocketAppender, and VersionMango::StdioAppender.

Referenced by LoggerInstance::append().

char [] getName  ) 
 

Return the name of this Appender.

Reimplemented in ConsoleAppender, VersionMango::FileAppender, NullAppender, VersionMango::RollingFileAppender, VersionMango::SocketAppender, and VersionMango::StdioAppender.

void append Event  event  ) 
 

Append a message to the output.

Reimplemented in ConsoleAppender, VersionMango::FileAppender, NullAppender, VersionMango::RollingFileAppender, VersionMango::SocketAppender, and VersionMango::StdioAppender.

Referenced by LoggerInstance::append().

this  )  [inline]
 

Create an Appender and default its layout to SimpleLayout.

Reimplemented in ConsoleAppender, ConsoleAppender, VersionMango::FileAppender, VersionMango::FileAppender, NullAppender, NullAppender, VersionMango::RollingFileAppender, VersionMango::SocketAppender, VersionMango::StdioAppender, and VersionMango::StdioAppender.

Definition at line 89 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 103 of file Appender.d.

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

void setLayout Layout  layout  )  [inline]
 

Set the current layout to be that of the argument.

Definition at line 118 of file Appender.d.

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

Layout getLayout  )  [inline]
 

Return the current Layout

Definition at line 129 of file Appender.d.

References layout.

void setNext Appender  next  )  [inline]
 

Attach another appender to this one

Definition at line 140 of file Appender.d.

Referenced by LoggerInstance::addAppender().

Appender getNext  )  [inline]
 

Return the next appender in the list

Definition at line 151 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 VersionMango::FileAppender, and VersionMango::SocketAppender.

Definition at line 163 of file Appender.d.


Member Data Documentation

Appender next [private]
 

Definition at line 54 of file Appender.d.

Layout layout [private]
 

Definition at line 55 of file Appender.d.

Referenced by getLayout(), and this().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:06:59 2004 for Mango by doxygen 1.3.6