Logging/src/LoggingClient.php
public static function psrBatchLogger($name, array $options = [])
    {
        $client = array_key_exists('clientConfig', $options)
            ? new self($options['clientConfig'])
            : new self();
        // Force enabling batch.
        $options['batchEnabled'] = true;
        return $client->psrLogger($name, $options);
    }
public static function psrBatchLogger($name, array $options = [])
    {
        $client = array_key_exists('clientConfig', $options)
            ? new self($options['clientConfig'])
            : new self();
        // Force enabling batch.
        $options['batchEnabled'] = true;
        return $client->psrLogger($name, $options);
    }
public static function psrBatchLogger ( $ name , array $ options = [ ] ) { $ client = array_key_exists ( 'clientConfig' , $ options ) ? new self ( $ options [ 'clientConfig' ] ) : new self ( ) ; // Force enabling batch. $ options [ 'batchEnabled' ] = true ; return $ client -> psrLogger ( $ name , $ options ) ; }
Create a PsrLogger with batching enabled.

@param string $name The name of the log to write entries to.
@param array $options [optional] {
Configuration options.

@type string $messageKey The key in the `jsonPayload` used to contain
the logged message. **Defaults to** `message`.
@type array $resource The
[monitored resource](https://cloud.google.com/logging/docs/api/reference/rest/v2/MonitoredResource)
to associate log entries with. **Defaults to** type global.
@type array $labels A set of user-defined (key, value) data that
provides additional information about the log entry.
@type MetadataProviderInterface $metadataProvider **Defaults to** An
automatically chosen provider, based on detected environment
settings.
@type bool $debugOutput Whether or not to output debug information.
Please note debug output currently only applies in CLI based
applications. **Defaults to** `false`.
@type array $batchOptions A set of options for a BatchJob.
{@see \Google\Cloud\Core\Batch\BatchJob::__construct()} for
more details.
**Defaults to** ['batchSize' => 1000,
'callPeriod' => 2.0,
'numWorkers' => 2].
@type array $clientConfig Configuration options for the Logging client
used to handle processing of batch items. For valid options
please see
{@see \Google\Cloud\Logging\LoggingClient::__construct()}.
@type BatchRunner $batchRunner A BatchRunner object. Mainly used for
the tests to inject a mock. **Defaults to** a newly created
BatchRunner.
@type ClosureSerializerInterface $closureSerializer An implementation
responsible for serializing closures used in the
`$clientConfig`. This is especially important when using the
batch daemon. **Defaults to**
{@see Google\Cloud\Core\Batch\OpisClosureSerializer} if the
`opis/closure` library is installed.
}
@return PsrLogger
@experimental The experimental flag means that while we believe this method
or class is ready for use, it may change before release in backwards-
incompatible ways. Please use with caution, and test thoroughly when
upgrading.
Create a PsrLogger with batching enabled .