Writes log messages to syslog

category Zend
package Zend_Log
subpackage Writer

 Methods

Constructor

__construct(array $params) : \Zend\Log\Writer\Syslog

Parameters

$params

array

Array of options; may include "application" and "facility" keys

Returns

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 application name

setApplicationName(string $appName) : \Zend\Log\Writer\Syslog

Parameters

$appName

string

Application name

Returns

Set convert write errors to exception flag

setConvertWriteErrorsToExceptions($convertErrors) 
Inherited

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

Parameters

$convertErrors

Set syslog facility

setFacility(int $facility) : \Zend\Log\Writer\Syslog

Parameters

$facility

int

Syslog facility

Exceptions

\Zend\Log\Exception\InvalidArgumentException for invalid log facility

Returns

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

Set a new formatter for this writer

setFormatter(\Zend\Log\Formatter\FormatterInterface $formatter) : \Zend\Log\Writer\self
Inherited

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

Parameters

Returns

\Zend\Log\Writer\self

Close syslog.

shutdown() : void

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 syslog.

doWrite(array $event) : void

Parameters

$event

array

event data

Initialize syslog / set application name and facility

initializeSyslog() : void

Initialize values facilities

initializeValidFacilities() : void

 Properties

 

Application name used by this syslog-writer instance

$appName : string

 

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

$convertWriteErrorsToExceptions : bool
Inherited

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

The default log priority - for unmapped custom priorities

$defaultPriority : string

 

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
 

Facility used by this syslog-writer instance

$facility : int

 

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
 

Last application name set by a syslog-writer instance

$lastApplication : string

 

Last facility name set by a syslog-writer instance

$lastFacility : string

 

Maps Zend_Log priorities to PHP's syslog priorities

$priorities : array

 

Types of program available to logging of message

$validFacilities : array