title: Fatal error: Class 'Psr\Log\AbstractLogger' not found in Logger.php on line 30
body: <p>I'm getting this error:</p>
  
  <p><strong>Fatal error: Class 'Psr\Log\AbstractLogger' not found in /var/www/html/rackspace/vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Log/Logger.php on line 30</strong></p>
  
  <p>This is my Logger.php file</p>
  
  <pre><code>&lt;?php
  /**
   * Copyright 2012-2014 Rackspace US, Inc.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  namespace OpenCloud\Common\Log;
  
  use OpenCloud\Common\Exceptions\LoggingException;
  use Psr\Log\AbstractLogger;
  use Psr\Log\LogLevel;
  
  /**
   * Basic logger for OpenCloud which extends FIG's PSR-3 standard logger.
   *
   * @link https://github.com/php-fig/log
   */
  class Logger extends AbstractLogger
  {
      /**
       * Is this debug class enabled or not?
       *
       * @var bool
       */
      private $enabled;
  
      /**
       * These are the levels which will always be outputted - regardless of
       * user-imposed settings.
       *
       * @var array
       */
      private $urgentLevels = array(
          LogLevel::EMERGENCY,
          LogLevel::ALERT,
          LogLevel::CRITICAL
      );
  
      /**
       * Logging options.
       *
       * @var array
       */
      private $options = array(
          'outputToFile' =&gt; false,
          'logFile'      =&gt; null,
          'dateFormat'   =&gt; 'd/m/y H:I',
          'delimeter'    =&gt; ' - '
      );
  
      public function __construct($enabled = false)
      {
          $this-&gt;enabled = $enabled;
      }
  
      public static function newInstance()
      {
          return new static();
      }
  
      /**
       * Determines whether a log level needs to be outputted.
       *
       * @param  string $logLevel
       * @return bool
       */
      private function outputIsUrgent($logLevel)
      {
          return in_array($logLevel, $this-&gt;urgentLevels);
      }
  
      /**
       * Interpolates context values into the message placeholders.
       *
       * @param string $message
       * @param array  $context
       * @return type
       */
      private function interpolate($message, array $context = array())
      {
          // build a replacement array with braces around the context keys
          $replace = array();
          foreach ($context as $key =&gt; $val) {
              $replace['{' . $key . '}'] = $val;
          }
  
          // interpolate replacement values into the message and return
          return strtr($message, $replace);
      }
  
      /**
       * Enable or disable the debug class.
       *
       * @param  bool $enabled
       * @return self
       */
      public function setEnabled($enabled)
      {
          $this-&gt;enabled = $enabled;
  
          return $this;
      }
  
      /**
       * Is the debug class enabled?
       *
       * @return bool
       */
      public function isEnabled()
      {
          return $this-&gt;enabled === true;
      }
  
      /**
       * Set an array of options.
       *
       * @param array $options
       */
      public function setOptions(array $options = array())
      {
          foreach ($options as $key =&gt; $value) {
              $this-&gt;setOption($key, $value);
          }
  
          return $this;
      }
  
      /**
       * Get all options.
       *
       * @return array
       */
      public function getOptions()
      {
          return $this-&gt;options;
      }
  
      /**
       * Set an individual option.
       *
       * @param string $key
       * @param string $value
       */
      public function setOption($key, $value)
      {
          if ($this-&gt;optionExists($key)) {
              $this-&gt;options[$key] = $value;
  
              return $this;
          }
      }
  
      /**
       * Get an individual option.
       *
       * @param  string $key
       * @return string|null
       */
      public function getOption($key)
      {
          if ($this-&gt;optionExists($key)) {
              return $this-&gt;options[$key];
          }
      }
  
      /**
       * Check whether an individual option exists.
       *
       * @param  string $key
       * @return bool
       */
      private function optionExists($key)
      {
          return array_key_exists($key, $this-&gt;getOptions());
      }
  
      /**
       * Outputs a log message if necessary.
       *
       * @param string $logLevel
       * @param string $message
       * @param string $context
       */
      public function log($level, $message, array $context = array())
      {
          if ($this-&gt;outputIsUrgent($level) || $this-&gt;isEnabled()) {
              $this-&gt;dispatch($message, $context);
          }
      }
  
      /**
       * Used to format the line outputted in the log file.
       *
       * @param  string $string
       * @return string
       */
      private function formatFileLine($string)
      {
          $format = $this-&gt;getOption('dateFormat') . $this-&gt;getOption('delimeter');
  
          return date($format) . $string;
      }
  
      /**
       * Dispatch a log output message.
       *
       * @param string $message
       * @param array  $context
       * @throws LoggingException
       */
      private function dispatch($message, $context)
      {
          $output = $this-&gt;interpolate($message, $context) . PHP_EOL;
  
          if ($this-&gt;getOption('outputToFile') === true) {
              $file = $this-&gt;getOption('logFile');
  
              if (!is_writable($file)) {
                  throw new LoggingException(
                      'The log file either does not exist or is not writeable'
                  );
              }
  
              // Output to file
              file_put_contents($file, $this-&gt;formatFileLine($output), FILE_APPEND);
          } else {
              echo $output;
          }
      }
  
      /**
       * Helper method, use PSR-3 warning function for deprecation warnings
       * @see http://www.php-fig.org/psr/psr-3/
       */
      public static function deprecated($method, $new)
      {
          return sprintf('The %s method is deprecated, please use %s instead', $method, $new);
      }
  }
  </code></pre>
  
  <p>This is what I've found on line no 30 in Logger.php file</p>
  
  <pre><code>class Logger extends AbstractLogger
  </code></pre>
  
  <p>I've installed the <a href="https://github.com/php-fig/log" rel="nofollow">Psr</a> at <code>/var/www/html/rackspace/vendor/rackspace/php-opencloud/lib/OpenCloud/Common/Log</code> but I'm sure that this is not the correct place.</p>
  
  <p>Any suggestions?</p>