开发者

error logging in zend

i am using z开发者_运维问答end for 1st time..i am facing problems in finding errors. when a setter and getter function name mismatch i get a an error...but the error is show sometimes and not all the time...how do i log such errors.is there any separate log for this?


You can create a simple logger and add a logging instance in the setter or getter function. THe attached sample uses firebug for you to immediately see your logs. You may also use file loggers.

$writer = new Zend_Log_Writer_Firebug();

$filter = new Zend_Log_Filter_Priority( Zend_Log::DEBUG );
$writer->addFilter($filter);
$logger = new Zend_Log ( $writer );

Alternatively, you can use the ever so usefil var_dump();exit(); to verify your issue..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜