Logging/src/LoggingClient.php
public function createSink($name, $destination, array $options = [])
    {
        $response =  $this->connection->createSink($options + [
            'parent' => $this->formattedProjectName,
            'name' => $name,
            'destination' => $destination,
            'outputVersionFormat' => 'VERSION_FORMAT_UNSPECIFIED'
        ]);

        return new Sink($this->connection, $name, $this->projectId, $response);
    }
public function createSink($name, $destination, array $options = [])
    {
        $response =  $this->connection->createSink($options + [
            'parent' => $this->formattedProjectName,
            'name' => $name,
            'destination' => $destination,
            'outputVersionFormat' => 'VERSION_FORMAT_UNSPECIFIED'
        ]);

        return new Sink($this->connection, $name, $this->projectId, $response);
    }
public function createSink ( $ name , $ destination , array $ options = [ ] ) { $ response = $ this -> connection -> createSink ( $ options + [ 'parent' => $ this -> formattedProjectName , 'name' => $ name , 'destination' => $ destination , 'outputVersionFormat' => 'VERSION_FORMAT_UNSPECIFIED' ] ) ; return new Sink ( $ this -> connection , $ name , $ this -> projectId , $ response ) ; }
Create a sink.

Example:
```
$sink = $logging->createSink('my-sink', 'storage.googleapis.com/my-bucket');
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create projects.sinks create API documentation.
@codingStandardsIgnoreEnd

@param string $name The name of the sink.
@param string $destination The export destination. Please see
[Exporting Logs With Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs#about_sinks)
for more information and examples.
@param array $options [optional] {
Configuration options.

@type string $filter An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters).
@type string $outputVersionFormat The log entry version to use for
this sink's exported log entries. This version does not have
to correspond to the version of the log entry when it was
written to Stackdriver Logging. May be either `V1` or `V2`.
**Defaults to** `V2`.
}
@return Sink
Create a sink .