Changeset 17055
- Timestamp:
- 04/06/09 18:47:53 (4 years ago)
- Files:
-
- branches/1.3/lib/log/sfWebDebugLogger.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.3/lib/log/sfWebDebugLogger.class.php
r16942 r17055 47 47 $dispatcher->connect('response.filter_content', array($this, 'filterResponseContent')); 48 48 } 49 49 50 50 $this->registerErrorHandler(); 51 51 52 52 return parent::initialize($dispatcher, $options); 53 53 } 54 54 55 55 /** 56 56 * Registers logger with PHP error handler. 57 57 */ 58 58 protected function registerErrorHandler() 59 { 60 set_error_handler(array($this,'handlePhpError')); 59 { 60 set_error_handler(array($this,'handlePhpError')); 61 61 } 62 62 63 63 /** 64 64 * PHP error handler send PHP errors to log. … … 86 86 case E_STRICT: 87 87 $this->dispatcher->notify(new sfEvent($this, 'application.log', array('priority' => sfLogger::ERR, sprintf($message, 'Strict notice')))); 88 break;88 break; 89 89 case E_NOTICE: 90 $this->dispatcher->notify(new sfEvent($this, 'application.log', array('priority' => sfLogger:: ERR, sprintf($message, 'Notice'))));91 break;90 $this->dispatcher->notify(new sfEvent($this, 'application.log', array('priority' => sfLogger::NOTICE, sprintf($message, 'Notice')))); 91 break; 92 92 case E_WARNING: 93 $this->dispatcher->notify(new sfEvent($this, 'application.log', array('priority' => sfLogger:: ERR, sprintf($message, 'Warning'))));94 break;93 $this->dispatcher->notify(new sfEvent($this, 'application.log', array('priority' => sfLogger::WARNING, sprintf($message, 'Warning')))); 94 break; 95 95 case E_RECOVERABLE_ERROR: 96 96 $this->dispatcher->notify(new sfEvent($this, 'application.log', array('priority' => sfLogger::ERR, sprintf($message, 'Error')))); 97 break;97 break; 98 98 } 99 99 100 return true; //prevent default error handling100 return false; // do not prevent default error handling 101 101 } 102 102