## Class LoggerLayoutPattern

Description

A flexible layout configurable with a pattern string.

Configurable parameters:

* converionPattern - A string which controls the formatting of logging events. See docs for full specification.

- version: $Revision: 1395470 $

Located in /log4php/layouts/LoggerLayoutPattern.php (line 33)

    LoggerConfigurable
       |
       --LoggerLayout
          |
          --LoggerLayoutPattern

Class Constant Summary
DEFAULT_CONVERSION_PATTERN = '%date %-5level %logger %message%newline'
TTCC_CONVERSION_PATTERN = '%d [%t] %p %c %x - %m%n'
Variable Summary
static mixed $defaultConverterMap
mixed $converterMap
mixed $pattern
Method Summary
static void getDefaultConverterMap ()
LoggerLayoutPattern __construct ()
void activateOptions ()
string format (LoggerLoggingEvent $event)
void setConversionPattern (array $conversionPattern)
Variables
static mixed $defaultConverterMap = array(
'c' => 'LoggerPatternConverterLogger',
'lo' => 'LoggerPatternConverterLogger',
'logger' => 'LoggerPatternConverterLogger',
'C' => 'LoggerPatternConverterClass',
'class' => 'LoggerPatternConverterClass',
'cookie' => 'LoggerPatternConverterCookie',
'd' => 'LoggerPatternConverterDate',
'date' => 'LoggerPatternConverterDate',
'e' => 'LoggerPatternConverterEnvironment',
'env' => 'LoggerPatternConverterEnvironment',
'ex' => 'LoggerPatternConverterThrowable',
'exception' => 'LoggerPatternConverterThrowable',
'throwable' => 'LoggerPatternConverterThrowable',
'F' => 'LoggerPatternConverterFile',
'file' => 'LoggerPatternConverterFile',
'l' => 'LoggerPatternConverterLocation',
'location' => 'LoggerPatternConverterLocation',
'L' => 'LoggerPatternConverterLine',
'line' => 'LoggerPatternConverterLine',
'm' => 'LoggerPatternConverterMessage',
'msg' => 'LoggerPatternConverterMessage',
'message' => 'LoggerPatternConverterMessage',
'M' => 'LoggerPatternConverterMethod',
'method' => 'LoggerPatternConverterMethod',
'n' => 'LoggerPatternConverterNewLine',
'newline' => 'LoggerPatternConverterNewLine',
'p' => 'LoggerPatternConverterLevel',
'le' => 'LoggerPatternConverterLevel',
'level' => 'LoggerPatternConverterLevel',
'r' => 'LoggerPatternConverterRelative',
'relative' => 'LoggerPatternConverterRelative',
'req' => 'LoggerPatternConverterRequest',
'request' => 'LoggerPatternConverterRequest',
's' => 'LoggerPatternConverterServer',
'server' => 'LoggerPatternConverterServer',
'ses' => 'LoggerPatternConverterSession',
'session' => 'LoggerPatternConverterSession',
'sid' => 'LoggerPatternConverterSessionID',
'sessionid' => 'LoggerPatternConverterSessionID',
't' => 'LoggerPatternConverterProcess',
'pid' => 'LoggerPatternConverterProcess',
'process' => 'LoggerPatternConverterProcess',
'x' => 'LoggerPatternConverterNDC',
'ndc' => 'LoggerPatternConverterNDC',
'X' => 'LoggerPatternConverterMDC',
'mdc' => 'LoggerPatternConverterMDC',
) (line 45)

Maps conversion keywords to the relevant converter (default implementation).

- access: protected

mixed $converterMap = array() (line 115)

Maps conversion keywords to the relevant converter.

- access: protected

mixed $pattern = self::DEFAULT_CONVERSION_PATTERN (line 42)

The conversion pattern.

- access: protected

Methods
static method getDefaultConverterMap (line 124)

Returns the default converter map.

- access: public

static void getDefaultConverterMap ()
Constructor __construct (line 129)

Constructor. Initializes the converter map.

- access: public

LoggerLayoutPattern __construct ()
activateOptions (line 147)

Processes the conversion pattern and creates a corresponding chain of pattern converters which will be used to format logging events.

- access: public

void activateOptions ()

Redefinition of:

LoggerLayout::activateOptions()
  Activates options for this layout.

format (line 162)

Produces a formatted string as specified by the conversion pattern.

- access: public

string format (LoggerLoggingEvent $event)

- LoggerLoggingEvent $event

Redefinition of:

LoggerLayout::format()
  Override this method to create your own layout format.

setConversionPattern (line 139)

Sets the conversionPattern option. This is the string which controls formatting and consists of a mix of literal content and conversion specifiers.

- access: public

void setConversionPattern (array $conversionPattern)

- array $conversionPattern

#### Inherited Methods

Inherited From LoggerLayout

> LoggerLayout::activateOptions()
> LoggerLayout::format()
> LoggerLayout::getContentType()
> LoggerLayout::getFooter()
> LoggerLayout::getHeader()
> LoggerLayout::warn()

Inherited From LoggerConfigurable

> LoggerConfigurable::setBoolean()
> LoggerConfigurable::setFileSize()
> LoggerConfigurable::setInteger()
> LoggerConfigurable::setLevel()
> LoggerConfigurable::setNumeric()
> LoggerConfigurable::setPositiveInteger()
> LoggerConfigurable::setString()
> LoggerConfigurable::warn()

Class Constants
DEFAULT_CONVERSION_PATTERN = '%date %-5level %logger %message%newline' (line 36)

Default conversion pattern

TTCC_CONVERSION_PATTERN = '%d [%t] %p %c %x - %m%n' (line 39)

Default conversion TTCC Pattern

Documentation generated on Mon, 02 Feb 2026 13:59:50 +0900 by phpDocumentor 1.4.4