Difference between Zend_debug and Zend_log

Zend_Debug is a very simple component that provides a quick way to dump variables to screen for ad-hoc debugging.

Zend_Debug::dump($_Server, 'SERVER VARS', true);

Above command will dump out the $_server array with the label SERVER VARS

Zend_Log
Zend_Debug is very good for ad hoc debugging. For more permanent debugging, we can use Zend_Log. Zend_Log has some greate features, including Firefox Firebug stream writer that enables us to log to the Firebug console.
$log = new Zend_Log(
new Zend_Log_Writer_Stream('php://output')
);

Multiple loggers and the ability to define your own events and log levels are also included in its features.

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 1 = eight