Public Member Functions | Data Fields | Protected Attributes

Zend_Log Class Reference

Public Member Functions

 __construct (Zend_Log_Writer_Abstract $writer=null)
 __destruct ()
 __call ($method, $params)
 log ($message, $priority)
 addPriority ($name, $priority)
 addFilter ($filter)
 addWriter (Zend_Log_Writer_Abstract $writer)
 setEventItem ($name, $value)

Data Fields

const EMERG = 0
const ALERT = 1
const CRIT = 2
const ERR = 3
const WARN = 4
const NOTICE = 5
const INFO = 6
const DEBUG = 7

Protected Attributes

 $_priorities = array()
 $_writers = array()
 $_filters = array()
 $_extras = array()

Detailed Description

Definition at line 29 of file Log.php.


Constructor & Destructor Documentation

__construct ( Zend_Log_Writer_Abstract writer = null )

Class constructor. Create a new logger

Parameters:
Zend_Log_Writer_Abstract | null$writerdefault writer

Definition at line 66 of file Log.php.

__destruct (  )

Class destructor. Shutdown log writers

Returns:
void

Definition at line 81 of file Log.php.


Member Function Documentation

__call ( method,
params 
)

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

Parameters:
string$methodpriority name
string$paramsmessage to log
Returns:
void
Exceptions:
Zend_Log_Exception

See also:
Zend_Log_Exception

Definition at line 99 of file Log.php.

addFilter ( filter )

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.

Parameters:
int | Zend_Log_Filter_Interface$filter
Returns:
void

See also:
Zend_Log_Filter_Priority
Zend_Log_Exception

Definition at line 184 of file Log.php.

addPriority ( name,
priority 
)

Add a custom priority

Parameters:
string$nameName of priority
integer$priorityNumeric priority
Exceptions:
Zend_Log_InvalidArgumentException

See also:
Zend_Log_Exception

Definition at line 161 of file Log.php.

addWriter ( Zend_Log_Writer_Abstract writer )

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

Parameters:
Zend_Log_Writer_Abstract$writer
Returns:
void

Definition at line 206 of file Log.php.

log ( message,
priority 
)

Log a message at a priority

Parameters:
string$messageMessage to log
integer$priorityPriority of message
Returns:
void
Exceptions:
Zend_Log_Exception

See also:
Zend_Log_Exception
Zend_Log_Exception

Definition at line 119 of file Log.php.

setEventItem ( name,
value 
)

Set an extra item to pass to the log writers.

Parameters:
$nameName of the field
$valueValue of the field
Returns:
void

Definition at line 218 of file Log.php.


The documentation for this class was generated from the following file: