Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StreamLogWriter.php

function StreamLogWriter::__construct

File

vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php, line 11

Class

StreamLogWriter

Namespace

OpenTelemetry\API\Behavior\Internal\LogWriter

Code

public function __construct(string $destination) {
    $stream = fopen($destination, 'a');
    if ($stream) {
        $this->stream = $stream;
    }
    else {
        throw new \RuntimeException(sprintf('Unable to open %s for writing', $destination));
    }
}
RSS feed
Powered by Drupal