#include <PatternLayout.hh>
PatternLayout is a simple fixed format Layout implementation.
Definition at line 25 of file PatternLayout.hh.
log4cpp::PatternLayout::PatternLayout |
( |
| ) |
|
log4cpp::PatternLayout::~PatternLayout |
( |
| ) |
|
|
virtual |
void log4cpp::PatternLayout::clearConversionPattern |
( |
| ) |
|
|
virtual |
std::string log4cpp::PatternLayout::format |
( |
const LoggingEvent & |
event | ) |
|
|
virtual |
std::string log4cpp::PatternLayout::getConversionPattern |
( |
| ) |
const |
|
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 2 additions. The additions are the specifier %l for milliseconds (padded with zeros to make 3 digits), and the specifier %L for microseconds (padded with zeros to make 6 digits). NB the precision of the microsecond additions is platform dependant, and may be no better than milliseconds. %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
-
Definition at line 299 of file PatternLayout.cpp.
std::string log4cpp::PatternLayout::_conversionPattern |
|
private |
const char * log4cpp::PatternLayout::BASIC_CONVERSION_PATTERN = "%R %p %c %x: %m%n" |
|
static |
const char * log4cpp::PatternLayout::DEFAULT_CONVERSION_PATTERN = "%m%n" |
|
static |
const char * log4cpp::PatternLayout::SIMPLE_CONVERSION_PATTERN = "%p - %m%n" |
|
static |
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 46 of file PatternLayout.hh.
The documentation for this class was generated from the following files:
log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:10:00