Browse Source

ZF-9014: remove obsolete code in Zend_Cache_Backend::_loggerSanity()

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20880 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 16 years ago
parent
commit
357fe19695
1 changed files with 4 additions and 10 deletions
  1. 4 10
      library/Zend/Cache/Backend.php

+ 4 - 10
library/Zend/Cache/Backend.php

@@ -226,22 +226,16 @@ class Zend_Cache_Backend
         if (!isset($this->_directives['logging']) || !$this->_directives['logging']) {
             return;
         }
-        try {
-            /**
-             * @see Zend_Log
-             */
-            require_once 'Zend/Log.php';
-        } catch (Zend_Exception $e) {
-            Zend_Cache::throwException('Logging feature is enabled but the Zend_Log class is not available', $e);
-        }
+
         if (isset($this->_directives['logger'])) {
             if ($this->_directives['logger'] instanceof Zend_Log) {
                 return;
-            } else {
-                Zend_Cache::throwException('Logger object is not an instance of Zend_Log class.');
             }
+            Zend_Cache::throwException('Logger object is not an instance of Zend_Log class.');
         }
+
         // Create a default logger to the standard output stream
+        require_once 'Zend/Log.php';
         require_once 'Zend/Log/Writer/Stream.php';
         $logger = new Zend_Log(new Zend_Log_Writer_Stream('php://output'));
         $this->_directives['logger'] = $logger;