l4snd::ostream_Appender Class Reference

Simple Appender class which redirects output to a std::ostream<char>. More...

Inheritance diagram for l4snd::ostream_Appender:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ostream_Appender (Appender *appender)
 Constructs the appender and tries to open the connection.
virtual ~ostream_Appender ()
 Destroyes the appender and the underlying 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.

Classes

class  StreamBuffer
 Helper buffer for output streaming.


Detailed Description

Simple Appender class which redirects output to a std::ostream<char>.

Definition at line 45 of file ostream_appender.h.


Constructor & Destructor Documentation

l4snd::ostream_Appender::ostream_Appender ( Appender appender  ) 

Constructs the appender and tries to open the connection.

Parameters:
appender pointer to actual appender (take ownership)

Definition at line 101 of file ostream_appender.cpp.


Member Function Documentation

void l4snd::ostream_Appender::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 118 of file ostream_appender.cpp.

References l4snd::Appender::append().

void l4snd::ostream_Appender::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 130 of file ostream_appender.cpp.

References l4snd::Appender::writeString().

bool l4snd::ostream_Appender::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 137 of file ostream_appender.cpp.

References l4snd::Appender::isWorking().


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