Methods

Constructor

__construct(array | \Traversable $options) : \Zend\Log\Writer\Logger

Set options for an writer. Accepted options are: - filters: array of filters to add to this filter - formatter: formatter for this writer

Parameters

$options

array\Traversable

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

\Zend\Log\Writer\Logger

Add a filter specific to this writer.

addFilter(int | string | \Zend\Log\Filter\FilterInterface $filter, array $options) : \Zend\Log\Writer\AbstractWriter

Get filter instance

filterPlugin(string $name, array $options) : \Zend\Log\Filter\FilterInterface

Parameters

$name

string

$options

arraynull

Returns

Get formatter instance

formatterPlugin(string $name, array $options) : \Zend\Log\Formatter\FormatterInterface

Parameters

$name

string

$options

arraynull

Returns

Get filter plugin manager

getFilterPluginManager() : \Zend\Log\Writer\FilterPluginManager

Get formatter plugin manager

getFormatterPluginManager() : \Zend\Log\Writer\FormatterPluginManager

Set convert write errors to exception flag

setConvertWriteErrorsToExceptions(bool $convertErrors) 

Parameters

$convertErrors

bool

Set filter plugin manager

setFilterPluginManager(string | \Zend\Log\Writer\FilterPluginManager $plugins) : \Zend\Log\Writer\self

Parameters

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

\Zend\Log\Writer\self

Set a new formatter for this writer

setFormatter(string | \Zend\Log\Formatter\FormatterInterface $formatter, array $options) : \Zend\Log\Writer\self

Parameters

$options

arraynull

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

\Zend\Log\Writer\self

Set formatter plugin manager

setFormatterPluginManager(string | \Zend\Log\Writer\FormatterPluginManager $plugins) : \Zend\Log\Writer\self

Parameters

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

\Zend\Log\Writer\self

Perform shutdown activities such as closing open resources

shutdown() : void

Log a message to this writer.

write(array $event) : void

Parameters

$event

array

log data event

Write a message to the log

doWrite(array $event) : void

Parameters

$event

array

log data event

 Properties

 

Use Zend\Stdlib\ErrorHandler to report errors during calls to write

$convertWriteErrorsToExceptions : bool

 

Error level passed to Zend\Stdlib\ErrorHandler::start for errors reported during calls to write

$errorsToExceptionsConversionLevel : bool

 

Filter plugins

$filterPlugins : \Zend\Log\Writer\FilterPluginManager

 

Filter chain

$filters : \Zend\Log\Filter\FilterInterface[]

 

Formats the log message before writing

$formatter : \Zend\Log\Formatter\FormatterInterface

 

Formatter plugins

$formatterPlugins : \Zend\Log\Writer\FormatterPluginManager