category Zend
package Zend_Log
copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
version $Id: Log.php 20893 2010-02-03 22:59:25Z yoshida@zend.co.jp $

 Methods

Undefined method handler allows a shortcut: $log->priorityName('message') instead of $log->log('message', Zend_Log::PRIORITY_NAME)

__call(string $method, string $params) : void

Parameters

$method

string

priority name

$params

string

message to log

Exceptions

\Zend_Log_Exception

Class constructor. Create a new logger

__construct(Zend_Log_Writer_Abstract $writer) 

Parameters

$writer

\Zend_Log_Writer_Abstractnull

default writer

Class destructor. Shutdown log writers

__destruct() : void

Add a filter that will be applied before all log writers.

addFilter(int | \Zend_Log_Filter_Interface $filter) : void

Before a message will be received by any of the writers, it must be accepted by all filters added with this method.

Parameters

Add a custom priority

addPriority(string $name, integer $priority) 

Parameters

$name

string

Name of priority

$priority

integer

Numeric priority

Exceptions

\Zend_Log_InvalidArgumentException

Add a writer. A writer is responsible for taking a log message and writing it out to storage.

addWriter(mixed $writer) : void

Parameters

$writer

mixed

Zend_Log_Writer_Abstract or Config array

Factory to construct the logger and one or more writers based on the configuration array

factory(array | \Zend_Config $config) : \Zend_Log

Parameters

$config

array\Zend_Config

Array or instance of Zend_Config

Returns

Log a message at a priority

log(string $message, integer $priority, mixed $extras) : void

Parameters

$message

string

Message to log

$priority

integer

Priority of message

$extras

mixed

Extra information to log in event

Exceptions

\Zend_Log_Exception

Set an extra item to pass to the log writers.

setEventItem(\$name $name, \$value $value) : void

Parameters

$name

\$name

Name of the field

$value

\$value

Value of the field

Construct filter object from configuration array or Zend_Config object

_constructFilterFromConfig(array | \Zend_Config $config) : \Zend_Log_Filter_Interface

Parameters

$config

array\Zend_Config

Zend_Config or Array

Returns

Construct a filter or writer from config

_constructFromConfig(string $type, mixed $config, string $namespace) : object

Parameters

$type

string

'writer' of 'filter'

$config

mixed

Zend_Config or Array

$namespace

string

Returns

object

Construct a writer object based on a configuration array

_constructWriterFromConfig($config) : \Zend_Log_Writer_Abstract

Parameters

$config

Returns

Get the writer or filter full classname

getClassName(array $config, string $type, string $defaultNamespace) : string

Parameters

$config

array

$type

string

filter|writer

$defaultNamespace

string

Returns

stringfull classname

 Properties

 

$_defaultFilterNamespace

$_defaultFilterNamespace : string

 

$_defaultWriterNamespace

$_defaultWriterNamespace : string

 

<p>of extra log event</p>

$_extras : array

 

<p>of Zend_Log_Filter_Interface</p>

$_filters : array

 

<p>of priorities where the keys are the priority numbers and the values are the priority names</p>

$_priorities : array

 

<p>of Zend_Log_Writer_Abstract</p>

$_writers : array

 Constants

 

ALERT

ALERT 

 

CRIT

CRIT 

 

DEBUG

DEBUG 

 

EMERG

EMERG 

 

ERR

ERR 

 

INFO

INFO 

 

NOTICE

NOTICE 

 

WARN

WARN