本文整理匯總了PHP中Zend_Log::trace方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Log::trace方法的具體用法?PHP Zend_Log::trace怎麽用?PHP Zend_Log::trace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Log
的用法示例。
在下文中一共展示了Zend_Log::trace方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
public function init()
{
$writer = new Zend_Log_Writer_Firebug();
$logger = new Zend_Log($writer);
$logger->addPriority('LOGD', 8);
$writer->setPriorityStyle(8, 'LOG');
$logger->addPriority('ERROR', 9);
$writer->setPriorityStyle(9, 'ERROR');
$logger->addPriority('TRACE', 10);
$writer->setPriorityStyle(10, 'TRACE');
$logger->addPriority('EXCEPTION', 11);
$writer->setPriorityStyle(11, 'EXCEPTION');
$logger->addPriority('TABLE', 12);
$writer->setPriorityStyle(12, 'TABLE');
$logger->logd($_SERVER);
$logger->info($_SERVER);
$logger->warn($_SERVER);
$logger->error($_SERVER);
$logger->trace($_SERVER);
try {
throw new Exception('Test Exception');
} catch (Exception $e) {
$logger->exception($e);
}
$logger->table(array('2 SQL queries took 0.06 seconds', array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2')))));
}