ZF-10444: Error logging

Issue Type: New Feature Created: 2010-09-11T13:00:33.000+0000 Last Updated: 2012-11-20T21:38:12.000+0000 Status: Open Fix version(s): Reporter: Marc-Antuan Enriquez (auterium) Assignee: None Tags: - Zend_Amf

Related issues: Attachments:


A really great security feature of the Zend_Amf is the proper error handling and the error message omission in the production mode, but when in production there might be some unexpected exceptions thrown by the very Zend Framework.

Usually, when the application is in production, there are users that do something wrong and suddenly for them "the application does not work" and end users are best known for their debugging capabilities (yeah right!).

Anyway, my proposal is to add a method on Zend_Amf_Server named "setExceptionLogger" which will go as follow:

//// Begin PHP code //// public function setExceptionLogger(Zend_Log $exceptionLogger) { $this->_exceptionLogger = $excpetionLogger; return $this; } //// End PHP code ////

and used inside method "_errorMessage" as follows:

//// Begin PHP code //// protected function _errorMessage($objectEncoding, $message, $description, $detail, $code, $line) { if($this->_exceptionLogger!==null){ $this->_exceptionLogger->log($message, Zend_Log::ERR); }


} //// End PHP code ////

This would help a lot in debugging applications, specially on production mode where we want to handle Exceptions without compromising the application.


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.