writeLogEntries method

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)

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

Future<WriteLogEntriesResponse> writeLogEntries(
  WriteLogEntriesRequest request,
) async {
  final url = Uri.https(_host, '/v2/entries:write');
  final response = await _client.post(url, body: request);
  return WriteLogEntriesResponse.fromJson(response);
}