log4cpp::PatternLayout (3) Linux Manual Page
log4cpp::PatternLayout –
PatternLayout is a simple fixed format Layout implementation.
Synopsis
#include <PatternLayout.hh> Inherits log4cpp::Layout.
Classes
class PatternComponentPublic Member Functions
PatternLayout ()virtual ~PatternLayout ()
virtual std::string format (const LoggingEvent &event)
Formats the LoggingEvent in the style set by the setConversionPattern call.
virtual void setConversionPattern (const std::string &conversionPattern) throw (ConfigureFailure)
Sets the format of log lines handled by this PatternLayout.
virtual std::string getConversionPattern () const
virtual void clearConversionPattern ()
Static Public Attributes
static const char * DEFAULT_CONVERSION_PATTERN = ‘%m%n’The default conversion pattern.
static const char * SIMPLE_CONVERSION_PATTERN = ‘%p – %m%n’
A conversion pattern equivalent to the SimpleLayout.
static const char * BASIC_CONVERSION_PATTERN = ‘%R %p %c %x: %m%n’
A conversion pattern equivalent to the BasicLayout.
static const char * TTCC_CONVERSION_PATTERN = ‘%r [%t] %p %c %x – %m%n’
A conversion pattern equivalent to the TTCCLayout.
Detailed Description
PatternLayout is a simple fixed format Layout implementation.Constructor & Destructor Documentation
log4cpp::PatternLayout::PatternLayout ()
log4cpp::PatternLayout::~PatternLayout () [virtual]
Member Function Documentation
void log4cpp::PatternLayout::clearConversionPattern () [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::getConversionPattern () const [virtual]
void log4cpp::PatternLayout::setConversionPattern (const std::string &conversionPattern)ConfigureFailure [virtual]
Sets the format of log lines handled by this PatternLayout. By default, set to ‘%%m%%n’.
Parameters:
- conversionPattern the conversion pattern
Exceptions:
- ConfigureFailure if the pattern is invalid
