src/Log.php
public function error($message)
    {
        if ($message) {
            if (is_int($message) && isset($this->errorList[$message])) {
                /*
                 * If the message is of type integer use a predefine
                 * error message
                 */
                $errorMessage = $this->errorList[$message];
                $this->report("Error[{$message}]: {$errorMessage}"); //Report The error
            } else {
                $errorMessage = $message;
                $this->report("Error: {$errorMessage}"); //Report The error
            }

            $errors = &$this->getErrors();
            $errors[] = $errorMessage;
        }

        return $this;
    }
public function error($message)
    {
        if ($message) {
            if (is_int($message) && isset($this->errorList[$message])) {
                /*
                 * If the message is of type integer use a predefine
                 * error message
                 */
                $errorMessage = $this->errorList[$message];
                $this->report("Error[{$message}]: {$errorMessage}"); //Report The error
            } else {
                $errorMessage = $message;
                $this->report("Error: {$errorMessage}"); //Report The error
            }

            $errors = &$this->getErrors();
            $errors[] = $errorMessage;
        }

        return $this;
    }
Log an error

@param string|int $message - An error message to log or the index of a predefined error

@return $this