l4snd Namespace Reference

Namespace for project "Log4J client library for C++". More...


Classes

class  Appender
 Appender class. More...
class  BoostListener
 Details see boost::unit_test::unit_test_log_formatter. More...
class  BoostReporter
class  CppUnitListener
 Listen for events from CppUnit and forward to log. More...
class  Exception
 Base class for all log4sendpp exceptions. More...
class  FileAppender
 Appender to a file. More...
class  Formatter
 Base class for all log4sendpp formatters. More...
class  LocationInformation
 Additional information for a logging event. More...
class  Logger
 Logger class. More...
class  MDC
 MDC class. More...
class  Mutex
 Supporter class for mutual exclusion of processes/threads. More...
class  NDC
 NDC class. More...
class  ostream_Appender
 Simple Appender class which redirects output to a std::ostream<char>. More...
class  Property
 Property class. More...
class  SimpleFormatter
 Message formatting in simple layout. More...
class  TcpIpAppender
 Appender to a socket. More...
class  ThreadDictionary
 Simple helper class to keep nick names of running thread for the log messages. More...
class  XmlFormatter
 Message formatting in log4j xml layout. More...

Typedefs

typedef void(* FailureHandler )(unsigned srcline, const std::string &srcfile, const std::string &message)
 Pointer to a failure handler (substitute for execptions).

Functions

template<typename T, typename uT>
std::string number_stpl (T n, unsigned base)
 Transform a signed scalar number into a string.
std::string number (long n, unsigned base=10)
 Converts a long value into its string representation.
std::string number (long long n, unsigned base=10)
 Converts a longlong value into its string representation.
template<typename T>
std::string number_utpl (T n, unsigned base)
 Transform an unsigned scalar number into a string.
std::string number (unsigned long n, unsigned base=10)
 Converts an unsigned long value into its string representation.
std::string number (unsigned long long n, unsigned base=10)
 Converts an unsigned long value into its string representation.
std::string number (double n, unsigned prec=0)
 Converts an double value into its string representation.
static bool findArg (std::string &fmt, int &pos, int &len)
 Helper function.
std::string & replaceFormatterString (std::string &formatter, const std::string &repdata)
 Replace a positional -parameter with a value.
static std::string charToReadable (unsigned x)
 Transform a character into a human readable string.
template<class T>
std::string ostreamed (const T &t)
 Outputter which reuses an existing operator<<(LOG4SENDPP_STD_NS::basic_ostream<wchar_t>&, T).
void getVersion (int &major, int &minor, int &patch, bool &debug, std::string &info)
 Gets the various parts of the version number.
void defaultFailureHandler (unsigned srcline, const std::string &srcfile, const std::string &message)
 default handler for failures when exception are disabled
void handleFailure (unsigned srcline, const std::string &srcfile, const std::string &message)
 Handles an internal failure.
FailureHandler setFailureHandler (FailureHandler handler)
 Sets pointer to failure handler.

Variables

static FailureHandler handlerptr = defaultFailureHandler
 pointer to failurehandler
Mutex dictMutex
 internal


Detailed Description

Namespace for project "Log4J client library for C++".

Typedef Documentation

typedef void(* l4snd::FailureHandler)(unsigned srcline, const std::string &srcfile, const std::string &message)

Pointer to a failure handler (substitute for execptions).

Parameters:
srcline the line in the sourcefile
srcfile the name of the sourcefile
message a human readable description about the cause

Definition at line 381 of file log4sendpp.h.


Function Documentation

void l4snd::getVersion ( int &  major,
int &  minor,
int &  patch,
bool &  debug,
std::string &  info 
)

Gets the various parts of the version number.

Parameters:
major major part
minor minor part
patch patch counter
debug true: compiled with DEBUG
info some human readable information

Definition at line 41 of file log4sendpp.cpp.

void l4snd::handleFailure ( unsigned  srcline,
const std::string &  srcfile,
const std::string &  message 
)

Handles an internal failure.

Parameters:
srcline the line in the sourcefile
srcfile the name of the sourcefile
message a human readable description about the cause

Definition at line 125 of file log4sendpp.cpp.

std::string l4snd::number ( double  n,
unsigned  prec = 0 
)

Converts an double value into its string representation.

Parameters:
n the actual value
prec the desired precision (amout of significant digits). 0 = minimum required, no trailing zeros.
Returns:
the resulting string

Definition at line 180 of file arguments.cpp.

Referenced by l4snd::ThreadDictionary::add(), charToReadable(), number_stpl(), number_utpl(), and operator<<().

std::string l4snd::number ( unsigned long long  n,
unsigned  base = 10 
)

Converts an unsigned long value into its string representation.

Parameters:
n the actual value
base the conversion base from 2 to 36
Returns:
the resulting string

Definition at line 173 of file arguments.cpp.

std::string l4snd::number ( unsigned long  n,
unsigned  base = 10 
)

Converts an unsigned long value into its string representation.

Parameters:
n the actual value
base the conversion base from 2 to 36
Returns:
the resulting string

Definition at line 165 of file arguments.cpp.

std::string l4snd::number ( long long  n,
unsigned  base = 10 
)

Converts a longlong value into its string representation.

Parameters:
n the actual value
base the conversion base from 2 to 36
Returns:
the resulting string

Definition at line 121 of file arguments.cpp.

std::string l4snd::number ( long  n,
unsigned  base = 10 
)

Converts a long value into its string representation.

Parameters:
n the actual value
base the conversion base from 2 to 36
Returns:
the resulting string

Definition at line 113 of file arguments.cpp.

Referenced by l4snd::XmlFormatter::format().

template<class T>
std ::string l4snd::ostreamed ( const T &  t  )  [inline]

Outputter which reuses an existing operator<<(LOG4SENDPP_STD_NS::basic_ostream<wchar_t>&, T).

Parameters:
t data type for output

Definition at line 350 of file arguments.h.

std::string & l4snd::replaceFormatterString ( std::string &  formatter,
const std::string &  repdata 
)

Replace a positional -parameter with a value.

Replaces the lowest -parameter with the string representation of the data. "hello %1" << "world" gives "hello world"

Parameters:
formatter target string with position parameter
repdata value to replace
Returns:
the resulting string

Definition at line 244 of file arguments.cpp.

References findArg(), and LOG4SENDPP_THROW.

Referenced by operator<<().

FailureHandler l4snd::setFailureHandler ( FailureHandler  handler  ) 

Sets pointer to failure handler.

Parameters:
handler pointer to a handler
Returns:
previous pointer

Definition at line 133 of file log4sendpp.cpp.

References handlerptr.


Generated on Sat Nov 24 14:41:24 2007 for log4sendpp by  doxygen 1.5.3