# Class LoggerLayoutPattern

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.

  LoggerConfigurable
  LoggerLayout
  LoggerLayoutPattern

Package: log4php\layouts
Version: $Revision: 1395470 $
Located at layouts/LoggerLayoutPattern.php

Methods summary
`public static` | # `getDefaultConverterMap( )` Returns the default converter map. Returns the default converter map.
`public` | # `__construct( )` Constructor. Initializes the converter map. Constructor. Initializes the converter map.
`public` | # `setConversionPattern( array $conversionPattern )` Sets the conversionPattern option. This is the string which controls formatting and consists of a mix of literal content and conversion specifiers. Sets the conversionPattern option. This is the string which controls formatting and consists of a mix of literal content and conversion specifiers. #### Parameters $conversionPattern `array` $conversionPattern
`public` | # `activateOptions( )` Processes the conversion pattern and creates a corresponding chain of pattern converters which will be used to format logging events. Processes the conversion pattern and creates a corresponding chain of pattern converters which will be used to format logging events. #### Overrides `LoggerLayout::activateOptions()`
`public string` | # `format( `LoggerLoggingEvent` $event )` Produces a formatted string as specified by the conversion pattern. Produces a formatted string as specified by the conversion pattern. #### Parameters $event ``LoggerLoggingEvent`` $event #### Returns `string` #### Overrides `LoggerLayout::format()`

Methods inherited from LoggerLayout
`getContentType(), getFooter(), getHeader(), warn()`

Methods inherited from LoggerConfigurable
`setBoolean(), setFileSize(), setInteger(), setLevel(), setNumeric(), setPositiveInteger(), setString()`

Constants summary
`string` | `DEFAULT_CONVERSION_PATTERN` | `'%date %-5level %logger %message%newline'` | # Default conversion pattern Default conversion pattern
`string` | `TTCC_CONVERSION_PATTERN` | `'%d [%t] %p %c %x - %m%n'` | # Default conversion TTCC Pattern Default conversion TTCC Pattern

Properties summary
`protected string` | $pattern | ``LoggerLayoutPattern::DEFAULT_CONVERSION_PATTERN`` | # The conversion pattern. The conversion pattern.
`protected static array` | $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', )` | # Maps conversion keywords to the relevant converter (default implementation). Maps conversion keywords to the relevant converter (default implementation).
`protected array` | $converterMap | `array()` | # Maps conversion keywords to the relevant converter. Maps conversion keywords to the relevant converter.