# Google Cloud Logging v2 API - Class LoggingServiceV2.LoggingServiceV2Base (4.5.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [4.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.4.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [4.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.3.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [4.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.2.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [4.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.1.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [4.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.0.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [3.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.6.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.5.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.4.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.3.0/Google.Cloud.Logging.V2.LoggingServiceV2.LoggingServiceV2Base)

    [BindServiceMethod(typeof(LoggingServiceV2), "BindService")]
    public abstract class LoggingServiceV2.LoggingServiceV2Base

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

Base class for server-side implementations of LoggingServiceV2

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> LoggingServiceV2.LoggingServiceV2Base

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Logging.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2)

## Assembly

Google.Cloud.Logging.V2.dll

## Methods

### DeleteLog(DeleteLogRequest, ServerCallContext)

    public virtual Task<Empty> DeleteLog(DeleteLogRequest request, ServerCallContext context)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.DeleteLogRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response to send back to the client (wrapped by a task). |

### ListLogEntries(ListLogEntriesRequest, ServerCallContext)

    public virtual Task<ListLogEntriesResponse> ListLogEntries(ListLogEntriesRequest request, ServerCallContext context)

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](https://cloud.google.com/logging/docs/export).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.ListLogEntriesRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.ListLogEntriesResponse` | The response to send back to the client (wrapped by a task). |

### ListLogs(ListLogsRequest, ServerCallContext)

    public virtual Task<ListLogsResponse> ListLogs(ListLogsRequest request, ServerCallContext context)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.ListLogsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.ListLogsResponse` | The response to send back to the client (wrapped by a task). |

### ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest, ServerCallContext)

    public virtual Task<ListMonitoredResourceDescriptorsResponse> ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest request, ServerCallContext context)

Lists the descriptors for monitored resource types used by Logging.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.ListMonitoredResourceDescriptorsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.ListMonitoredResourceDescriptorsResponse` | The response to send back to the client (wrapped by a task). |

### TailLogEntries(IAsyncStreamReader\<TailLogEntriesRequest\>, IServerStreamWriter\<TailLogEntriesResponse\>, ServerCallContext)

    public virtual Task TailLogEntries(IAsyncStreamReader<TailLogEntriesRequest> requestStream, IServerStreamWriter<TailLogEntriesResponse> responseStream, ServerCallContext context)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `requestStream` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.IAsyncStreamReader-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.TailLogEntriesRequest` Used for reading requests from the client. |
| `responseStream` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.IServerStreamWriter-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.TailLogEntriesResponse` Used for sending responses back to the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task indicating completion of the handler. |

### WriteLogEntries(WriteLogEntriesRequest, ServerCallContext)

    public virtual Task<WriteLogEntriesResponse> WriteLogEntries(WriteLogEntriesRequest request, ServerCallContext context)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.WriteLogEntriesRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.WriteLogEntriesResponse` | The response to send back to the client (wrapped by a task). |