l4snd::SimpleFormatter Class Reference

Message formatting in simple layout. More...

Inheritance diagram for l4snd::SimpleFormatter:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimpleFormatter (const std::string &appname)
 Constructs the formatter.
 SimpleFormatter (const std::string &appname, const std::string &hostname)
 Constructs the formatter.
virtual std::vector
< std::string > 
format (Logger::Level level, const std::string &msg, std::string category, LOG4SENDPP_INT64 stamp, const LocationInformation *loginfo, const Logger::DiagnosticInformation *diaginfo)
 Formats a message.


Detailed Description

Message formatting in simple layout.

Definition at line 45 of file simpleformatter.h.


Constructor & Destructor Documentation

l4snd::SimpleFormatter::SimpleFormatter ( const std::string &  appname  ) 

Constructs the formatter.

Sets also the hostname.

Parameters:
appname application name

Definition at line 54 of file simpleformatter.cpp.

References l4snd::TcpIpAppender::gethostname().

l4snd::SimpleFormatter::SimpleFormatter ( const std::string &  appname,
const std::string &  hostname 
)

Constructs the formatter.

Parameters:
appname application name
hostname hostname

Definition at line 46 of file simpleformatter.cpp.


Member Function Documentation

std::vector< std::string > l4snd::SimpleFormatter::format ( Logger::Level  level,
const 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::Formatter.

Definition at line 62 of file simpleformatter.cpp.

References l4snd::Logger::Debug, l4snd::Logger::Error, l4snd::Logger::Fatal, l4snd::Logger::Info, l4snd::Logger::Trace, and l4snd::Logger::Warning.


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