protected function write(array $record): void
    {
        if (!isset($record['formatted']) || 'string' !== gettype($record['formatted'])) {
            throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string');
        }

        $messageBody = $record['formatted'];
        if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) {
            $messageBody = substr($messageBody, 0, static::HEAD_MESSAGE_SIZE);
        }

        $this->client->sendMessage([
            'QueueUrl' => $this->queueUrl,
            'MessageBody' => $messageBody,
        ]);
    }
protected function write(array $record): void
    {
        if (!isset($record['formatted']) || 'string' !== gettype($record['formatted'])) {
            throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string');
        }

        $messageBody = $record['formatted'];
        if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) {
            $messageBody = substr($messageBody, 0, static::HEAD_MESSAGE_SIZE);
        }

        $this->client->sendMessage([
            'QueueUrl' => $this->queueUrl,
            'MessageBody' => $messageBody,
        ]);
    }
protected function write ( array $ record ) : void { if ( ! isset ( $ record [ 'formatted' ] ) || 'string' !== gettype ( $ record [ 'formatted' ] ) ) { throw new \ InvalidArgumentException ( 'SqsHandler accepts only formatted records as a string' ) ; } $ messageBody = $ record [ 'formatted' ] ; if ( strlen ( $ messageBody ) >= static :: MAX_MESSAGE_SIZE ) { $ messageBody = substr ( $ messageBody , 0 , static :: HEAD_MESSAGE_SIZE ) ; } $ this -> client -> sendMessage ( [ 'QueueUrl' => $ this -> queueUrl , 'MessageBody' => $ messageBody , ] ) ; }
Writes the record down to the log of the implementing handler.

@param array $record
Writes the record down to the log of the implementing handler .