protected function log($operation, $id = null, $ttl = null, $hit = null)
    {
        $message = strtoupper($operation);
        if ($id !== null) {
            $id = implode(', ', (array) $id);
            if ($ttl !== null) {
                $message = sprintf('%s(%s, ttl=%s)', $message, $id, $ttl);
            } else {
                $message = sprintf('%s(%s)', $message, $id);
            }
        }
        if ($hit !== null) {
            $message .= ' = ' . ($hit ? 'HIT' : 'MISS');
        }
        $this->logger->addRecord($this->logLevel, $message);
    }