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);
    }
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);
    }
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 ) ; }
Logs an operation

@param string $operation
@param string|array $id
@param int $ttl
@param bool $hit
Logs an operation