Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

log4cpp::PatternLayout Class Reference

BasicLayout is a simple fixed format Layout implementation. More...

#include <PatternLayout.hh>

Inheritance diagram for log4cpp::PatternLayout:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 PatternLayout ()
virtual ~PatternLayout ()
virtual std::string format (const LoggingEvent &event)
 Formats the LoggingEvent in the style set by the setConversionPattern call.

bool setConversionPattern (std::string conversionPattern)
 Sets the format of log lines handled by this PatternLayout.


Detailed Description

BasicLayout is a simple fixed format Layout implementation.


Constructor & Destructor Documentation

log4cpp::PatternLayout::PatternLayout  
 

log4cpp::PatternLayout::~PatternLayout   [virtual]
 


Member Function Documentation

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

Formats the LoggingEvent in the style set by the setConversionPattern call.

By default, set to "mn"

Implements log4cpp::Layout.

bool log4cpp::PatternLayout::setConversionPattern std::string    conversionPattern
 

Sets the format of log lines handled by this PatternLayout.

By default, set to "mn".
Format characters are as follows:

  • %% - a single percent sign
  • c - the category
  • d - the date
  • D - seconds since 1970
  • 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
    Returns:
    true if conversionPattern is a valid conversion pattern, false if it's invalid

  • The documentation for this class was generated from the following files:
    Generated on Fri May 9 10:40:03 2003 for log4cpp by doxygen1.2.18