Logger/Logger.php
public function logCommand($command, $duration, $connection, $error = false)
    {
        ++$this->commandCount;

        if (null !== $this->logger) {
            $this->commands[] = [
                'cmd' => $command,
                'executionMS' => $duration,
                'conn' => $connection,
                'error' => $error
            ];

            if ($error) {
                $this->logger->error('Command "' . $command . '" failed (' . $error . ')');
            } else {
                $this->logger->debug('Executing command "' . $command . '"');
            }
        }
    }
public function logCommand($command, $duration, $connection, $error = false)
    {
        ++$this->commandCount;

        if (null !== $this->logger) {
            $this->commands[] = [
                'cmd' => $command,
                'executionMS' => $duration,
                'conn' => $connection,
                'error' => $error
            ];

            if ($error) {
                $this->logger->error('Command "' . $command . '" failed (' . $error . ')');
            } else {
                $this->logger->debug('Executing command "' . $command . '"');
            }
        }
    }
Logs a command

@param string      $command    Redis command
@param float       $duration   Duration in milliseconds
@param string      $connection Connection alias
@param bool|string $error      Error message or false if command was successful