.TH "log4tango::PatternLayout" 3 "Wed Sep 2 2020" "Version 5.0.2" "log4tango" \" -*- nroff -*- .ad l .nh .SH NAME log4tango::PatternLayout .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBlog4tango::Layout\fP\&. .SS "Classes" .in +1c .ti -1c .RI "class \fBPatternComponent\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBPatternLayout\fP ()" .br .ti -1c .RI "virtual \fB~PatternLayout\fP ()" .br .ti -1c .RI "virtual std::string \fBformat\fP (const \fBLoggingEvent\fP &event)" .br .RI "Formats the \fBLoggingEvent\fP in the style set by the set_conversion_pattern call\&. " .ti -1c .RI "virtual int \fBset_conversion_pattern\fP (const std::string &conversionPattern)" .br .RI "Sets the format of log lines handled by this \fBPatternLayout\fP\&. " .ti -1c .RI "virtual std::string \fBget_conversion_pattern\fP () const" .br .ti -1c .RI "virtual void \fBclear_conversion_pattern\fP ()" .br .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static const char * \fBBASIC_CONVERSION_PATTERN\fP = '%R %p %c %m%n'" .br .RI "A conversion pattern equivalent to the BasicLayout\&. " .in -1c .SH "Constructor & Destructor Documentation" .PP .SS "log4tango::PatternLayout::PatternLayout ()" .SS "log4tango::PatternLayout::~PatternLayout ()\fC [virtual]\fP" .SH "Member Function Documentation" .PP .SS "void log4tango::PatternLayout::clear_conversion_pattern ()\fC [virtual]\fP" .SS "std::string log4tango::PatternLayout::format (const \fBLoggingEvent\fP & event)\fC [virtual]\fP" .PP Formats the \fBLoggingEvent\fP in the style set by the set_conversion_pattern call\&. By default, set to '%%m%%n' .PP Reimplemented from \fBlog4tango::Layout\fP\&. .SS "std::string log4tango::PatternLayout::get_conversion_pattern () const\fC [virtual]\fP" .SS "int log4tango::PatternLayout::set_conversion_pattern (const std::string & conversionPattern)\fC [virtual]\fP" .PP Sets the format of log lines handled by this \fBPatternLayout\fP\&. By default, set to '%%m%%n'\&. .br Format characters are as follows: .br .PD 0 .IP "\(bu" 2 \fB%%%%\fP - a single percent sign .IP "\(bu" 2 \fB%c\fP - the logger .IP "\(bu" 2 \fB%d\fP - the date .br 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\&. .IP "\(bu" 2 \fB%m\fP - the message .IP "\(bu" 2 \fB%n\fP - the platform specific line separator .IP "\(bu" 2 \fB%p\fP - the level .IP "\(bu" 2 \fB%r\fP - milliseconds since this layout was created\&. .IP "\(bu" 2 \fB%R\fP - seconds since Jan 1, 1970 .IP "\(bu" 2 \fB%u\fP - clock ticks since process start .IP "\(bu" 2 \fB%x\fP - the NDC .PP \fBParameters\fP .RS 4 \fIconversionPattern\fP the conversion pattern .RE .PP \fBExceptions\fP .RS 4 \fIConfigureFailure\fP if the pattern is invalid .RE .PP .SH "Member Data Documentation" .PP .SS "const char * log4tango::PatternLayout::BASIC_CONVERSION_PATTERN = '%R %p %c %m%n'\fC [static]\fP" .PP A conversion pattern equivalent to the BasicLayout\&. .SH "Author" .PP Generated automatically by Doxygen for log4tango from the source code\&.