MongoDB log writer.

category Zend
package Zend_Log
subpackage Writer

 Methods

Constructor

__construct(\Mongo | \MongoClient | array | \Traversable $mongo, string | \Zend\Log\Writer\MongoDB $database, string $collection, array $saveOptions) 

Parameters

$mongo

\Mongo\MongoClientarray\Traversable

$database

string\Zend\Log\Writer\MongoDB

$collection

string

$saveOptions

array

Exceptions

\Zend\Log\Writer\Exception\InvalidArgumentException

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 filter plugin manager

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

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

Returns

Set convert write errors to exception flag

setConvertWriteErrorsToExceptions($convertErrors) 
Inherited

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

Parameters

$convertErrors

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

This writer does not support formatting.

setFormatter(\Zend\Log\Formatter\FormatterInterface $formatter) : void

Parameters

$formatter

\Zend\Log\Writer\Zend\Log\Formatter\FormatterInterface

Exceptions

\Zend\Log\Writer\Zend\Log\Exception\InvalidArgumentException

Perform shutdown activities such as closing open resources

shutdown() : void
Inherited

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

Log a message to this writer.

write(array $event) : void
Inherited

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

Parameters

$event

array

log data event

Write a message to the log.

doWrite(array $event) : void

Parameters

$event

array

Event data

Exceptions

\Zend\Log\Writer\Zend\Log\Exception\RuntimeException

 Properties

 

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
 

MongoCollection instance

$mongoCollection : \Zend\Log\Writer\MongoCollection

 

Options used for MongoCollection::save()

$saveOptions : array