Buffers all events until the strategy determines to flush them.

see \Zend\Log\Writer\http://packages.python.org/Logbook/api/handlers.html#logbook.FingersCrossedHandler

 Methods

Constructor

__construct(\Zend\Log\Writer\WriterInterface | string | array | \Traversable $writer, \Zend\Log\Filter\FilterInterface | int $filterOrPriority, int $bufferSize) : \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

$writer

\Zend\Log\Writer\WriterInterfacestringarray\Traversable

Wrapped writer or array of configuration options

$filterOrPriority

\Zend\Log\Filter\FilterInterfaceint

Filter or log priority which determines buffering of events

$bufferSize

int

Maximum buffer size

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
Inherited

inherited_from \Zend\Log\Writer\AbstractWriter::addFilter()

Parameters

$options

arraynull

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

Get filter instance

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

inherited_from \Zend\Log\Writer\AbstractWriter::filterPlugin()

Parameters

$name

string

$options

arraynull

Returns

Get formatter instance

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

inherited_from \Zend\Log\Writer\AbstractWriter::formatterPlugin()

Parameters

$name

string

$options

arraynull

Returns

Get filter plugin manager

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

inherited_from \Zend\Log\Writer\AbstractWriter::getFilterPluginManager()

Returns

Get formatter plugin manager

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

inherited_from \Zend\Log\Writer\AbstractWriter::getFormatterPluginManager()

Returns

Get writer plugin manager

getWriterPluginManager() : \Zend\Log\WriterPluginManager

Resets the state of the handler.

reset() 

Stops forwarding records to the wrapped writer

Set convert write errors to exception flag

setConvertWriteErrorsToExceptions(bool $convertErrors) 
Inherited

inherited_from \Zend\Log\Writer\AbstractWriter::setConvertWriteErrorsToExceptions()

Parameters

$convertErrors

bool

Set filter plugin manager

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

inherited_from \Zend\Log\Writer\AbstractWriter::setFilterPluginManager()

Parameters

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

\Zend\Log\Writer\self

Stub in accordance to parent method signature.

setFormatter(string | \Zend\Log\Formatter\FormatterInterface $formatter) : \Zend\Log\Writer\WriterInterface

Fomatters must be set on the wrapped writer.

Parameters

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

Set formatter plugin manager

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

inherited_from \Zend\Log\Writer\AbstractWriter::setFormatterPluginManager()

Parameters

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

\Zend\Log\Writer\self

Set a new writer

setWriter(string | \Zend\Log\Writer\WriterInterface $writer, array $options) : \Zend\Log\Writer\self

Parameters

$options

arraynull

Exceptions

\Zend\Log\Exception\InvalidArgumentException

Returns

\Zend\Log\Writer\self

Set writer plugin manager

setWriterPluginManager(string | \Zend\Log\WriterPluginManager $plugins) : \Zend\Log\Writer\FingersCrossed

Record shutdown

shutdown() : void

Log a message to this writer.

write(array $event) : void

Parameters

$event

array

log data event

Get writer instance

writerPlugin(string $name, array $options) : \Zend\Log\Writer\WriterInterface

Parameters

$name

string

$options

arraynull

Returns

Write message to buffer or delegate event data to the wrapped writer

doWrite(array $event) : void

Parameters

$event

array

event data

Check if buffered data should be flushed

isActivated(array $event) : boolean

Parameters

$event

array

event data

Returns

booleantrue if buffered data should be flushed

 Properties

 

array of log events

$buffer : array

 

Oldest entries are removed from the buffer if bufferSize is reached.

$bufferSize : int

0 is infinte buffer size.

 

Flag if buffering is enabled

$buffering : boolean

 

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

$convertWriteErrorsToExceptions : bool
Inherited

inherited_from \Zend\Log\Writer\AbstractWriter::$$convertWriteErrorsToExceptions
 

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

$errorsToExceptionsConversionLevel : bool
Inherited

inherited_from \Zend\Log\Writer\AbstractWriter::$$errorsToExceptionsConversionLevel
 

Filter plugins

$filterPlugins : \Zend\Log\Writer\FilterPluginManager
Inherited

inherited_from \Zend\Log\Writer\AbstractWriter::$$filterPlugins
 

Filter chain

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

inherited_from \Zend\Log\Writer\AbstractWriter::$$filters
 

Formats the log message before writing

$formatter : \Zend\Log\Formatter\FormatterInterface
Inherited

inherited_from \Zend\Log\Writer\AbstractWriter::$$formatter
 

Formatter plugins

$formatterPlugins : \Zend\Log\Writer\FormatterPluginManager
Inherited

inherited_from \Zend\Log\Writer\AbstractWriter::$$formatterPlugins
 

The wrapped writer

$writer : \Zend\Log\Writer\WriterInterface

 

Writer plugins

$writerPlugins : \Zend\Log\WriterPluginManager