API Documentation

Log.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Log
version
$Id: Log.php 22632 2010-07-18 18:30:08Z ramon $
Classes
Zend_Log

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Log

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Log
version
$Id: Log.php 22632 2010-07-18 18:30:08Z ramon $
Constants
EMERG
ALERT
CRIT
ERR
WARN
NOTICE
INFO
DEBUG
Properties
$_priorities
$_writers
$_filters
$_extras
$_defaultWriterNamespace
$_defaultFilterNamespace
Methods
__construct
factory
_constructWriterFromConfig
_constructFilterFromConfig
_constructFromConfig
getClassName
__destruct
__call
log
addPriority
addFilter
addWriter
setEventItem

Description

Constants

EMERG

 EMERG = '0'

Details

value
0

ALERT

 ALERT = '1'

Details

value
1

CRIT

 CRIT = '2'

Details

value
2

ERR

 ERR = '3'

Details

value
3

WARN

 WARN = '4'

Details

value
4

NOTICE

 NOTICE = '5'

Details

value
5

INFO

 INFO = '6'

Details

value
6

DEBUG

 DEBUG = '7'

Details

value
7

Properties

$_defaultFilterNamespace

string $_defaultFilterNamespace = 'Zend_Log_Filter'

Details

$_defaultFilterNamespace
string
visibility
protected
default
Zend_Log_Filter
final
false
static
false

$_defaultWriterNamespace

string $_defaultWriterNamespace = 'Zend_Log_Writer'

Details

$_defaultWriterNamespace
string
visibility
protected
default
Zend_Log_Writer
final
false
static
false

$_extras

array $_extras = 'array'

Details

$_extras
array
of extra log event
visibility
protected
default
array
final
false
static
false

$_filters

array $_filters = 'array'

Details

$_filters
array
of Zend_Log_Filter_Interface
visibility
protected
default
array
final
false
static
false

$_priorities

array $_priorities = 'array'

Details

$_priorities
array
of priorities where the keys are the priority numbers and the values are the priority names
visibility
protected
default
array
final
false
static
false

$_writers

array $_writers = 'array'

Details

$_writers
array
of Zend_Log_Writer_Abstract
visibility
protected
default
array
final
false
static
false

Methods

__call

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

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

Arguments
$method
string
priority name
$params
string
message to log
Details
visibility
public
final
false
static
false
throws

__construct

__construct( Zend_Log_Writer_Abstract|null $writer = null ) :

Class constructor. Create a new logger

Arguments
$writer
Zend_Log_Writer_Abstractnull
default writer
Details
visibility
public
final
false
static
false

__destruct

__destruct( ) : void

Class destructor. Shutdown log writers

Details
visibility
public
final
false
static
false

_constructFilterFromConfig

_constructFilterFromConfig( array|Zend_Config $config ) : Zend_Log_Filter_Interface

Construct filter object from configuration array or Zend_Config object

Arguments
$config
arrayZend_Config
Zend_Config or Array
Details
visibility
protected
final
false
static
false

_constructFromConfig

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

Construct a filter or writer from config

Arguments
$type
string
'writer' of 'filter'
$config
mixed
Zend_Config or Array
$namespace
string
Output
object
Details
visibility
protected
final
false
static
false

_constructWriterFromConfig

_constructWriterFromConfig(  $config ) : Zend_Log_Writer_Abstract

Construct a writer object based on a configuration array

Arguments
$config
Details
visibility
protected
final
false
static
false

addFilter

addFilter( int|Zend_Log_Filter_Interface $filter ) : void

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

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

Arguments
$filter
intZend_Log_Filter_Interface
Details
visibility
public
final
false
static
false

addPriority

addPriority( string $name, integer $priority ) :

Add a custom priority

Arguments
$name
string
Name of priority
$priority
integer
Numeric priority
Details
visibility
public
final
false
static
false
throws

addWriter

addWriter( mixed $writer ) : void

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

Arguments
$writer
mixed
Zend_Log_Writer_Abstract or Config array
Details
visibility
public
final
false
static
false

factory

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

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

Arguments
$config
arrayZend_Config
Array or instance of Zend_Config
Output
Zend_Log
Details
visibility
public
final
false
static
true

getClassName

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

Get the writer or filter full classname

Arguments
$config
array
$type
string
filter|writer
$defaultNamespace
string
Output
string
full classname
Details
visibility
protected
final
false
static
false

log

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

Log a message at a priority

Arguments
$message
string
Message to log
$priority
integer
Priority of message
$extras
mixed
Extra information to log in event
Details
visibility
public
final
false
static
false
throws

setEventItem

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

Set an extra item to pass to the log writers.

Arguments
$name
$name
Name of the field
$value
$value
Value of the field
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.