package Default

 Methods

Class constructor (the default encoding is UTF-8)

__construct(array|\Traversable $options = array()) : \Zend\Log\Formatter\Xml

Parameters

$options

array\Traversable

Returns

\Zend\Log\Formatter\Xml

Formats data into a single line to be written by the writer.

format(array $event) : string
inherited_from \Zend\Log\Formatter\FormatterInterface::format()

Parameters

$event

array

event data

Returns

stringformatted line to write to the log

Get the format specifier for DateTime objects

getDateTimeFormat() 
inherited_from \Zend\Log\Formatter\FormatterInterface::getDateTimeFormat()

Get encoding

getEncoding() : string

Returns

string

Get Escaper instance

getEscaper() : \Zend\Escaper\Escaper

Lazy-loads an instance with the current encoding if none registered.

Returns

\Zend\Escaper\Escaper

Set the format specifier for DateTime objects

setDateTimeFormat(string $dateTimeFormat) 
inherited_from \Zend\Log\Formatter\FormatterInterface::setDateTimeFormat()

Parameters

$dateTimeFormat

Set encoding

setEncoding(string $value) : \Zend\Log\Formatter\Xml

Parameters

$value

string

Returns

\Zend\Log\Formatter\Xml

Set Escaper instance

setEscaper(\Zend\Escaper\Escaper $escaper) : \Zend\Log\Formatter\Xml

Parameters

$escaper

\Zend\Escaper\Escaper

Returns

\Zend\Log\Formatter\Xml

Recursion function to create an xml tree structure out of array structure

buildElementTree(\Zend\Log\Formatter\DomDocument $doc, \Zend\Log\Formatter\DomElement $rootElement, $mixedData) : \Zend\Log\Formatter\DomElement

Parameters

$doc

\Zend\Log\Formatter\DomDocument
  • DomDocument where the current nodes will be generated

$rootElement

\Zend\Log\Formatter\DomElement
  • root element the tree will be attached to

$mixedData

array|Traversable - mixedData

Returns

\Zend\Log\Formatter\DomElement$domElement - DOM Element with appended child nodes

 Properties

 

Format specifier for DateTime objects in event data (default: ISO 8601)

$dateTimeFormat : string

Default

self::DEFAULT_DATETIME_FORMAT
see
 

Relates XML elements to log data field keys.

$elementMap : array

Default

 

Encoding to use in XML

$encoding : string

Default

 

instance

$escaper : \Zend\Escaper\Escaper

Default

 

Name of root element

$rootElement : string

Default