Google Cloud Logging v2 API - Class LoggingServiceV2ClientImpl (4.3.0)

public sealed class LoggingServiceV2ClientImpl : LoggingServiceV2Client

Reference documentation and code samples for the Google Cloud Logging v2 API class LoggingServiceV2ClientImpl.

LoggingServiceV2 client wrapper implementation, for convenient use.

Inheritance

object > LoggingServiceV2Client > LoggingServiceV2ClientImpl

Namespace

Google.Cloud.Logging.V2

Assembly

Google.Cloud.Logging.V2.dll

Remarks

Service for ingesting and querying logs.

Constructors

LoggingServiceV2ClientImpl(LoggingServiceV2Client, LoggingServiceV2Settings, ILogger)

public LoggingServiceV2ClientImpl(LoggingServiceV2.LoggingServiceV2Client grpcClient, LoggingServiceV2Settings settings, ILogger logger)

Constructs a client wrapper for the LoggingServiceV2 service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient LoggingServiceV2LoggingServiceV2Client

The underlying gRPC client.

settings LoggingServiceV2Settings

The base LoggingServiceV2Settings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override LoggingServiceV2.LoggingServiceV2Client GrpcClient { get; }

The underlying gRPC LoggingServiceV2 client

Property Value
Type Description
LoggingServiceV2LoggingServiceV2Client
Overrides

Methods

DeleteLog(DeleteLogRequest, CallSettings)

public override void DeleteLog(DeleteLogRequest request, CallSettings callSettings = null)

Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.

Parameters
Name Description
request DeleteLogRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteLogAsync(DeleteLogRequest, CallSettings)

public override Task DeleteLogAsync(DeleteLogRequest request, CallSettings callSettings = null)

Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.

Parameters
Name Description
request DeleteLogRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

ListLogEntries(ListLogEntriesRequest, CallSettings)

public override PagedEnumerable<ListLogEntriesResponse, LogEntry> ListLogEntries(ListLogEntriesRequest request, CallSettings callSettings = null)

Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.

Parameters
Name Description
request ListLogEntriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListLogEntriesResponseLogEntry

A pageable sequence of LogEntry resources.

Overrides

ListLogEntriesAsync(ListLogEntriesRequest, CallSettings)

public override PagedAsyncEnumerable<ListLogEntriesResponse, LogEntry> ListLogEntriesAsync(ListLogEntriesRequest request, CallSettings callSettings = null)

Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.

Parameters
Name Description
request ListLogEntriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListLogEntriesResponseLogEntry

A pageable asynchronous sequence of LogEntry resources.

Overrides

ListLogs(ListLogsRequest, CallSettings)

public override PagedEnumerable<ListLogsResponse, string> ListLogs(ListLogsRequest request, CallSettings callSettings = null)

Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.

Parameters
Name Description
request ListLogsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListLogsResponsestring

A pageable sequence of string resources.

Overrides

ListLogsAsync(ListLogsRequest, CallSettings)

public override PagedAsyncEnumerable<ListLogsResponse, string> ListLogsAsync(ListLogsRequest request, CallSettings callSettings = null)

Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.

Parameters
Name Description
request ListLogsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListLogsResponsestring

A pageable asynchronous sequence of string resources.

Overrides

ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest, CallSettings)

public override PagedEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest request, CallSettings callSettings = null)

Lists the descriptors for monitored resource types used by Logging.

Parameters
Name Description
request ListMonitoredResourceDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListMonitoredResourceDescriptorsResponseMonitoredResourceDescriptor

A pageable sequence of MonitoredResourceDescriptor resources.

Overrides

ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest, CallSettings)

public override PagedAsyncEnumerable<ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> ListMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest request, CallSettings callSettings = null)

Lists the descriptors for monitored resource types used by Logging.

Parameters
Name Description
request ListMonitoredResourceDescriptorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListMonitoredResourceDescriptorsResponseMonitoredResourceDescriptor

A pageable asynchronous sequence of MonitoredResourceDescriptor resources.

Overrides

TailLogEntries(CallSettings, BidirectionalStreamingSettings)

public override LoggingServiceV2Client.TailLogEntriesStream TailLogEntries(CallSettings callSettings = null, BidirectionalStreamingSettings streamingSettings = null)

Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs.

Parameters
Name Description
callSettings CallSettings

If not null, applies overrides to this RPC call.

streamingSettings BidirectionalStreamingSettings

If not null, applies streaming overrides to this RPC call.

Returns
Type Description
LoggingServiceV2ClientTailLogEntriesStream

The client-server stream.

Overrides

WriteLogEntries(WriteLogEntriesRequest, CallSettings)

public override WriteLogEntriesResponse WriteLogEntries(WriteLogEntriesRequest request, CallSettings callSettings = null)

Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)

Parameters
Name Description
request WriteLogEntriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
WriteLogEntriesResponse

The RPC response.

Overrides

WriteLogEntriesAsync(WriteLogEntriesRequest, CallSettings)

public override Task<WriteLogEntriesResponse> WriteLogEntriesAsync(WriteLogEntriesRequest request, CallSettings callSettings = null)

Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)

Parameters
Name Description
request WriteLogEntriesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskWriteLogEntriesResponse

A Task containing the RPC response.

Overrides