You are here

protected function SocketHandler::write in Lagoon Logs 8

Connect (if necessary) and write to the socket

Parameters

array $record:

Throws

\UnexpectedValueException

\RuntimeException

File

src/Logger/SocketHandler.php, line 77

Class

SocketHandler
Stores to any socket - uses fsockopen() or pfsockopen().

Namespace

Drupal\lagoon_logs\Logger

Code

protected function write(array $record) {
  $this
    ->connectIfNotConnected();
  $data = $this
    ->generateDataStream($record);
  $this
    ->writeToSocket($data);
}