log4cpp::PatternLayout Class Reference

#include <PatternLayout.hh>

Inheritance diagram for log4cpp::PatternLayout:
Inheritance graph
[legend]

List of all members.

Classes

class  PatternComponent

Public Member Functions

virtual void clearConversionPattern ()
virtual void clearConversionPattern ()
virtual std::string format (const LoggingEvent &event)
virtual std::string format (const LoggingEvent &event)
virtual std::string getConversionPattern () const
virtual std::string getConversionPattern () const
 PatternLayout ()
 PatternLayout ()
virtual void setConversionPattern (const std::string &conversionPattern) throw (ConfigureFailure)
virtual void setConversionPattern (const std::string &conversionPattern) throw (ConfigureFailure)
virtual ~PatternLayout ()
virtual ~PatternLayout ()

Static Public Attributes

static const char * BASIC_CONVERSION_PATTERN = "%R %p %c %x: %m%n"
static const char * DEFAULT_CONVERSION_PATTERN = "%m%n"
static const char * SIMPLE_CONVERSION_PATTERN = "%p - %m%n"
static const char * TTCC_CONVERSION_PATTERN = "%r [%t] %p %c %x - %m%n"

Private Types

typedef std::vector
< PatternComponent * > 
ComponentVector
typedef std::vector
< PatternComponent * > 
ComponentVector

Private Attributes

ComponentVector _components
std::string _conversionPattern

Detailed Description

PatternLayout is a simple fixed format Layout implementation.

Definition at line 20 of file include/log4cpp/PatternLayout.hh.


Member Typedef Documentation

Definition at line 98 of file install/include/log4cpp/PatternLayout.hh.

Definition at line 88 of file include/log4cpp/PatternLayout.hh.


Constructor & Destructor Documentation

log4cpp::PatternLayout::PatternLayout (  ) 

Definition at line 219 of file PatternLayout.cpp.

log4cpp::PatternLayout::~PatternLayout (  )  [virtual]

Definition at line 226 of file PatternLayout.cpp.

log4cpp::PatternLayout::PatternLayout (  ) 
virtual log4cpp::PatternLayout::~PatternLayout (  )  [virtual]

Member Function Documentation

virtual void log4cpp::PatternLayout::clearConversionPattern (  )  [virtual]
void log4cpp::PatternLayout::clearConversionPattern (  )  [virtual]

Definition at line 230 of file PatternLayout.cpp.

virtual std::string log4cpp::PatternLayout::format ( const LoggingEvent event  )  [virtual]

Formats the LoggingEvent in the style set by the setConversionPattern call. By default, set to "%%m%%n"

Implements log4cpp::Layout.

std::string log4cpp::PatternLayout::format ( const LoggingEvent event  )  [virtual]

Formats the LoggingEvent in the style set by the setConversionPattern call. By default, set to "%%m%%n"

Implements log4cpp::Layout.

Definition at line 357 of file PatternLayout.cpp.

virtual std::string log4cpp::PatternLayout::getConversionPattern (  )  const [virtual]
std::string log4cpp::PatternLayout::getConversionPattern (  )  const [virtual]

Definition at line 353 of file PatternLayout.cpp.

virtual void log4cpp::PatternLayout::setConversionPattern ( const std::string &  conversionPattern  )  throw (ConfigureFailure) [virtual]

Sets the format of log lines handled by this PatternLayout. By default, set to "%%m%%n".
Format characters are as follows:
%% - a single percent sign %c - the category %d - the date
Date format: The date format character may be followed by a date format specifier enclosed between braces. For example, %d{%H:%M:%S,%l} or %d{%d %m %Y %H:%M:%S,%l}. If no date format specifier is given then the following format is used: "Wed Jan 02 02:03:55 1980". The date format specifier admits the same syntax as the ANSI C function strftime, with 1 addition. The addition is the specifier %l for milliseconds, padded with zeros to make 3 digits. %m - the message %n - the platform specific line separator %p - the priority %r - milliseconds since this layout was created. %R - seconds since Jan 1, 1970 %u - clock ticks since process start %x - the NDC

Parameters:
conversionPattern the conversion pattern
Exceptions:
ConfigureFailure if the pattern is invalid
void log4cpp::PatternLayout::setConversionPattern ( const std::string &  conversionPattern  )  throw (ConfigureFailure) [virtual]

Sets the format of log lines handled by this PatternLayout. By default, set to "%%m%%n".
Format characters are as follows:
%% - a single percent sign %c - the category %d - the date
Date format: The date format character may be followed by a date format specifier enclosed between braces. For example, %d{%H:%M:%S,%l} or %d{%d %m %Y %H:%M:%S,%l}. If no date format specifier is given then the following format is used: "Wed Jan 02 02:03:55 1980". The date format specifier admits the same syntax as the ANSI C function strftime, with 1 addition. The addition is the specifier %l for milliseconds, padded with zeros to make 3 digits. %m - the message %n - the platform specific line separator %p - the priority %r - milliseconds since this layout was created. %R - seconds since Jan 1, 1970 %u - clock ticks since process start %x - the NDC

Parameters:
conversionPattern the conversion pattern
Exceptions:
ConfigureFailure if the pattern is invalid

Definition at line 239 of file PatternLayout.cpp.


Member Data Documentation

Definition at line 89 of file include/log4cpp/PatternLayout.hh.

Definition at line 91 of file include/log4cpp/PatternLayout.hh.

const char * log4cpp::PatternLayout::BASIC_CONVERSION_PATTERN = "%R %p %c %x: %m%n" [static]

A conversion pattern equivalent to the BasicLayout.

Definition at line 30 of file include/log4cpp/PatternLayout.hh.

The default conversion pattern

Definition at line 20 of file include/log4cpp/PatternLayout.hh.

const char * log4cpp::PatternLayout::SIMPLE_CONVERSION_PATTERN = "%p - %m%n" [static]

A conversion pattern equivalent to the SimpleLayout.

Definition at line 25 of file include/log4cpp/PatternLayout.hh.

const char * log4cpp::PatternLayout::TTCC_CONVERSION_PATTERN = "%r [%t] %p %c %x - %m%n" [static]

A conversion pattern equivalent to the TTCCLayout. Note: TTCCLayout is in log4j but not log4cpp.

Definition at line 36 of file include/log4cpp/PatternLayout.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


log4cpp
Author(s): Stephen Roderick
autogenerated on Fri Jan 11 09:51:55 2013