package Default
inherited_from \Zend\Log\Formatter\Base

 Methods

Class constructor

__construct(null|string $format = null, null|string $dateTimeFormat = null
see
inherited_from \Zend\Log\Formatter\Base::__construct()

Parameters

$format

nullstring

Format specifier for log messages

$dateTimeFormat

nullstring

Format specifier for DateTime objects in event data

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Class constructor

__construct(null|string|array|\Traversable $dateTimeFormat = null
Inherited
see

Parameters

$dateTimeFormat

nullstringarray\Traversable

Format for DateTime objects

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

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

Parameters

$event

array

event data

Returns

stringformatted line to write to the log

Formats data to be written by the writer.

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

Parameters

$event

array

event data

Returns

array

Get the format specifier for DateTime objects

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

Set the format specifier for DateTime objects

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

Parameters

$dateTimeFormat

Normalize all non-scalar data types (except null) in a string value

normalize(mixed $value) : mixed
Inherited

Parameters

$value

mixed

Returns

mixed

 Properties

 

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

$dateTimeFormat : string

Default

self::DEFAULT_DATETIME_FORMAT
see
 

Format specifier for log messages

$format : string

Default

 Constants

 

DEFAULT_FORMAT

DEFAULT_FORMAT = '%timestamp% %priorityName% (%priority%): %message% %extra%'