/// <summary> /// Lists log entries. Use this method to retrieve log entries from Cloud /// Logging. For ways to export log entries, see /// [Exporting Logs](/logging/docs/export). /// </summary> /// <param name="project_ids"> /// Required. One or more project IDs or project numbers from which to retrieve /// log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. /// </param> /// <param name="filter"> /// Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). /// The filter is compared against all log entries in the projects specified by /// `projectIds`. Only entries that match the filter are retrieved. An empty /// filter matches all log entries. /// </param> /// <param name="order_by"> /// Optional. How the results should be sorted. Presently, the only permitted /// values are `"timestamp"` (default) and `"timestamp desc"`. The first /// option returns entries in order of increasing values of /// `LogEntry.timestamp` (oldest first), and the second option returns entries /// in order of decreasing timestamps (newest first). Entries with equal /// timestamps are returned in order of `LogEntry.insertId`. /// </param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>The RPC response.</returns> public override IEnumerable <LogEntry> ListLogEntries( IEnumerable <string> projectIds, string filter, string orderBy, CallSettings callSettings = null) { ListLogEntriesRequest request = new ListLogEntriesRequest { ProjectIds = { projectIds }, Filter = filter, OrderBy = orderBy, }; return(s_listLogEntriesPageStreamer.Fetch( request, pageStreamRequest => GrpcClient.ListLogEntries( pageStreamRequest, _clientHelper.BuildCallOptions(null, callSettings)) )); }
/// <summary> /// Lists log entries. Use this method to retrieve log entries from Cloud /// Logging. For ways to export log entries, see /// [Exporting Logs](/logging/docs/export). /// </summary> /// <param name="project_ids"> /// Required. One or more project IDs or project numbers from which to retrieve /// log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. /// </param> /// <param name="filter"> /// Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). /// The filter is compared against all log entries in the projects specified by /// `projectIds`. Only entries that match the filter are retrieved. An empty /// filter matches all log entries. /// </param> /// <param name="order_by"> /// Optional. How the results should be sorted. Presently, the only permitted /// values are `"timestamp"` (default) and `"timestamp desc"`. The first /// option returns entries in order of increasing values of /// `LogEntry.timestamp` (oldest first), and the second option returns entries /// in order of decreasing timestamps (newest first). Entries with equal /// timestamps are returned in order of `LogEntry.insertId`. /// </param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public override IAsyncEnumerable <LogEntry> ListLogEntriesAsync( IEnumerable <string> projectIds, string filter, string orderBy, CallSettings callSettings = null) { ListLogEntriesRequest request = new ListLogEntriesRequest { ProjectIds = { projectIds }, Filter = filter, OrderBy = orderBy, }; return(s_listLogEntriesPageStreamer.FetchAsync( request, (pageStreamRequest, cancellationToken) => GrpcClient.ListLogEntriesAsync( pageStreamRequest, _clientHelper.BuildCallOptions(cancellationToken, callSettings) ).ResponseAsync )); }