Writes log messages to syslog

category Zend
package Zend_Log
subpackage Writer
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Log_Writer_Abstract

 Methods

Class constructor

__construct(array $params = array()) : void

Parameters

$params

array

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

Add a filter specific to this writer.

addFilter(\Zend_Log_Filter_Interface|integer $filter) : \Zend_Log_Writer_Abstract
Inherited

Parameters

$filter

\Zend_Log_Filter_Interfaceinteger

Filter class or filter priority

Exceptions

\Zend_Log_Exception

Returns

\Zend_Log_Writer_Abstract

Create a new instance of Zend_Log_Writer_Syslog

factory(array|\Zend_Config $config) : \Zend_Log_Writer_Syslog
Static

Parameters

$config

array\Zend_Config

Returns

\Zend_Log_Writer_Syslog

Set application name

setApplicationName(string $application) : \Zend_Log_Writer_Syslog

Parameters

$application

string

Application name

Returns

\Zend_Log_Writer_Syslog

Set syslog facility

setFacility(integer $facility) : \Zend_Log_Writer_Syslog

Parameters

$facility

integer

Syslog facility

Exceptions

\Zend_Log_Exception for invalid log facility

Returns

\Zend_Log_Writer_Syslog

Set a new formatter for this writer

setFormatter(\Zend_Log_Formatter_Interface $formatter) : \Zend_Log_Writer_Abstract
Inherited

Parameters

$formatter

\Zend_Log_Formatter_Interface

Returns

\Zend_Log_Writer_Abstract

Close syslog.

shutdown() : void
inherited_from \Zend_Log_Writer_Abstract::shutdown()

Perform shutdown activites such as closing open resources

shutdown() : void
Inherited

Log a message to this writer.

write(array $event) : void
Inherited

Parameters

$event

array

log data event

Initialize syslog / set application name and facility

_initializeSyslog() : void

Initialize values facilities

_initializeValidFacilities() : void

Validate and optionally convert the config to array

_parseConfig(array|\Zend_Config $config) : array
InheritedStatic

Parameters

$config

array\Zend_Config

Zend_Config or Array

Exceptions

\Zend_Log_Exception

Returns

array

Write a message to syslog.

_write(array $event) : void
inherited_from \Zend_Log_Writer_Abstract::_write()

Parameters

$event

array

event data

Write a message to the log.

_write(array $event) : void
Inherited

Parameters

$event

array

log data event

 Properties

 

Application name used by this syslog-writer instance

$_application : string

Default

'Zend_Log'
 

The default log priority - for unmapped custom priorities

$_defaultPriority : string

Default

LOG_NOTICE
 

Facility used by this syslog-writer instance

$_facility : integer

Default

LOG_USER
 

of Zend_Log_Filter_Interface

$_filters : array

Default

array()
 

Formats the log message before writing.

$_formatter : \Zend_Log_Formatter_Interface

Default

 

Last application name set by a syslog-writer instance

$_lastApplication : string

Default

Static
 

Last facility name set by a syslog-writer instance

$_lastFacility : string

Default

Static
 

Maps Zend_Log priorities to PHP's syslog priorities

$_priorities : array

Default

array(\Zend_Log::EMERG => LOG_EMERG, \Zend_Log::ALERT => LOG_ALERT, \Zend_Log::CRIT => LOG_CRIT, \Zend_Log::ERR => LOG_ERR, \Zend_Log::WARN => LOG_WARNING, \Zend_Log::NOTICE => LOG_NOTICE, \Zend_Log::INFO => LOG_INFO, \Zend_Log::DEBUG => LOG_DEBUG)
 

Types of program available to logging of message

$_validFacilities : array

Default

array()