l4snd::FileAppender Class Reference

Appender to a file. More...

Inheritance diagram for l4snd::FileAppender:

Inheritance graph
[legend]
Collaboration diagram for l4snd::FileAppender:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FileAppender (Formatter *formatter, const std::string &name)
 Construct the file appender.
virtual void append (Logger::Level level, std::string msg, std::string category, LOG4SENDPP_INT64 stamp, const LocationInformation *loginfo, const Logger::DiagnosticInformation *diaginfo)
 Formats a message.
virtual void writeString (const std::string &data)
 Appends a raw string to the current file.
virtual bool isWorking () const
 Tests if the appender is correctly working.


Detailed Description

Appender to a file.

Definition at line 43 of file file_appender.h.


Constructor & Destructor Documentation

l4snd::FileAppender::FileAppender ( Formatter formatter,
const std::string &  name 
)

Construct the file appender.

Parameters:
formatter pointer to foratter
name filename

Definition at line 43 of file file_appender.cpp.


Member Function Documentation

void l4snd::FileAppender::append ( Logger::Level  level,
std::string  msg,
std::string  category,
LOG4SENDPP_INT64  stamp,
const LocationInformation loginfo,
const Logger::DiagnosticInformation diaginfo 
) [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

Implements l4snd::Appender.

Definition at line 51 of file file_appender.cpp.

References l4snd::Formatter::format(), l4snd::Appender::getFormatter(), and writeString().

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

Appends a raw string to the current file.

Parameters:
data string with data

Implements l4snd::Appender.

Definition at line 72 of file file_appender.cpp.

Referenced by append().

bool l4snd::FileAppender::isWorking (  )  const [virtual]

Tests if the appender is correctly working.

Returns:
true if connection is in a sane state

Implements l4snd::Appender.

Definition at line 79 of file file_appender.cpp.


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