log4cpp::PatternLayout(3)
π log4cpp::PatternLayout π
okay bestie, welcome to the log4cpp::PatternLayout(3) page from the Library Functions Manual β the main character is log4cpp::PatternLayout, and she is a simple fixed format Layout implementation. no cap, that's the whole lore β¨
β¨ NAME β¨
log4cpp::PatternLayout β PatternLayout is a simple fixed format Layout implementation.
π¦ SYNOPSIS π¦
#include <PatternLayout.hh>
Inherits log4cpp::Layout.
π Classes
class PatternComponent
π Public Member Functions
PatternLayout ()β constructor vibes.virtual ~PatternLayout ()β virtual destructor, clean-up queen.virtual std::string format (const LoggingEvent &event)β Formats theLoggingEventin the style set by thesetConversionPatterncall.virtual void setConversionPattern (const std::string &conversionPattern)β Sets the format of log lines handled by thisPatternLayout.virtual std::string getConversionPattern () constβ signature only on this page, bestie.virtual void clearConversionPattern ()β signature only, no extra notes here.
πΈ Public Member Functions inherited from log4cpp::Layout
virtual ~Layout ()β Destructor forLayout.
π 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 theSimpleLayout.static const char * BASIC_CONVERSION_PATTERN = '%R %p %c %x: %m%n'β A conversion pattern equivalent to theBasicLayout.static const char * TTCC_CONVERSION_PATTERN = '%r [%t] %p %c %x - %m%n'β A conversion pattern equivalent to theTTCCLayout.
π Detailed Description π
PatternLayout is a simple fixed format Layout implementation. lowkey iconic.
π§ Constructor & Destructor Documentation π§
πΌ log4cpp::PatternLayout::PatternLayout ()
log4cpp::PatternLayout::PatternLayout ()
constructor, that's the vibe.
π log4cpp::PatternLayout::~PatternLayout () [virtual]
log4cpp::PatternLayout::~PatternLayout () [virtual]
virtual destructor, clean-up queen.
π₯ Member Function Documentation π₯
π§Ή clearConversionPattern () [virtual]
void log4cpp::PatternLayout::clearConversionPattern () [virtual]
signature only β the page gives no extra description here, bestie.
π« format (...) [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.
π§Ό getConversionPattern () const [virtual]
std::string log4cpp::PatternLayout::getConversionPattern () const [virtual]
signature only, no extra lore.
ποΈ setConversionPattern (...) [virtual]
void log4cpp::PatternLayout::setConversionPattern (const std::string & conversionPattern) [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
ConfigureFailureif the pattern is invalid
π Member Data Documentation π
const char * log4cpp::PatternLayout::BASIC_CONVERSION_PATTERN = '%R %p %c %x: %m%n' [static]β A conversion pattern equivalent to theBasicLayout.const char * log4cpp::PatternLayout::DEFAULT_CONVERSION_PATTERN = '%m%n' [static]β The default conversion pattern.const char * log4cpp::PatternLayout::SIMPLE_CONVERSION_PATTERN = '%p - %m%n' [static]β A conversion pattern equivalent to theSimpleLayout.const char * log4cpp::PatternLayout::TTCC_CONVERSION_PATTERN = '%r [%t] %p %c %x - %m%n' [static]β A conversion pattern equivalent to theTTCCLayout. Note: TTCCLayout is in log4j but not log4cpp.
π Author π
Generated automatically by Doxygen for log4cpp from the source code.
okay bestie, that's the whole page π footer recap: source is log4cpp, version is Version 1.1, and the footer text you gave me has no date listed β so I'm not inventing one ππ
. log4cpp::PatternLayout(3) out, slay responsibly π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms