l4snd::Appender Class Reference

Appender class. More...

Inheritance diagram for l4snd::Appender:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Appender (Formatter *formatter)
 Construct the appender.
virtual void append (Logger::Level level, std::string msg, std::string category, LOG4SENDPP_INT64 stamp, const LocationInformation *loginfo, const Logger::DiagnosticInformation *diaginfo)=0
 Formats a message.
void setFormatter (Formatter *formatter)
 Sets the formatter for this appender.
virtual ~Appender ()
 Provide virtual destructor.
virtual bool isWorking () const =0
 Tests if the appender is correctly working.
virtual void writeString (const std::string &data)=0
 Appends a raw string to the current file.
FormattergetFormatter () const
 Gets the formatter for this appender.


Detailed Description

Appender class.

Definition at line 48 of file appender.h.


Constructor & Destructor Documentation

l4snd::Appender::Appender ( Formatter formatter  ) 

Construct the appender.

Parameters:
formatter pointer to according formatter

Definition at line 41 of file appender.cpp.

References setFormatter().


Member Function Documentation

virtual void l4snd::Appender::append ( Logger::Level  level,
std::string  msg,
std::string  category,
LOG4SENDPP_INT64  stamp,
const LocationInformation loginfo,
const Logger::DiagnosticInformation diaginfo 
) [pure virtual]

Formats a message.

Parameters:
level severty level
msg string to log
category message category
stamp timestamp in milliseconds since 1.1.1970
loginfo pointer to location info or 0
diaginfo pointer to diagnostic info or 0
Returns:
formatted message in one or more lines

Implemented in l4snd::FileAppender, l4snd::ostream_Appender, and l4snd::TcpIpAppender.

Referenced by l4snd::ostream_Appender::append(), and l4snd::Logger::log().

void l4snd::Appender::setFormatter ( Formatter formatter  ) 

Sets the formatter for this appender.

Parameters:
formatter pointer to new formatter

Definition at line 52 of file appender.cpp.

Referenced by Appender().

virtual bool l4snd::Appender::isWorking (  )  const [pure virtual]

Tests if the appender is correctly working.

Returns:
true if connection is in a sane state

Implemented in l4snd::FileAppender, l4snd::ostream_Appender, and l4snd::TcpIpAppender.

Referenced by l4snd::ostream_Appender::isWorking(), and l4snd::Logger::log().

virtual void l4snd::Appender::writeString ( const std::string &  data  )  [pure virtual]

Appends a raw string to the current file.

Parameters:
data string with data

Implemented in l4snd::FileAppender, l4snd::ostream_Appender, and l4snd::TcpIpAppender.

Referenced by l4snd::ostream_Appender::writeString().

Formatter * l4snd::Appender::getFormatter (  )  const

Gets the formatter for this appender.

Returns:
pointer to formatter

Definition at line 58 of file appender.cpp.

Referenced by l4snd::TcpIpAppender::append(), and l4snd::FileAppender::append().


The documentation for this class was generated from the following files:
Generated on Sat Nov 24 14:41:24 2007 for log4sendpp by  doxygen 1.5.3