log4cpp::PatternLayout(3)

πŸ“¦
version 1.1.4 Β· 3 versions
, in opensuse-leap 16.0

πŸ’… 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 the LoggingEvent in the style set by the setConversionPattern call.
  • virtual void setConversionPattern (const std::string &conversionPattern) β€” Sets the format of log lines handled by this PatternLayout.
  • 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 for Layout.

🌈 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. 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

  • ConfigureFailure if 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 the BasicLayout.
  • 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 the SimpleLayout.
  • 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.

πŸ‘‘ 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