log_entry.proto 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright 2016 Google Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.api.servicecontrol.v1;
  16. import "google/api/annotations.proto";
  17. import "google/logging/type/log_severity.proto";
  18. import "google/protobuf/any.proto";
  19. import "google/protobuf/struct.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "LogEntryProto";
  23. option java_package = "com.google.api.servicecontrol.v1";
  24. // An individual log entry.
  25. message LogEntry {
  26. // Required. The log to which this log entry belongs. Examples: `"syslog"`,
  27. // `"book_log"`.
  28. string name = 10;
  29. // The time the event described by the log entry occurred. If
  30. // omitted, defaults to operation start time.
  31. google.protobuf.Timestamp timestamp = 11;
  32. // The severity of the log entry. The default value is
  33. // `LogSeverity.DEFAULT`.
  34. google.logging.type.LogSeverity severity = 12;
  35. // A unique ID for the log entry used for deduplication. If omitted,
  36. // the implementation will generate one based on operation_id.
  37. string insert_id = 4;
  38. // A set of user-defined (key, value) data that provides additional
  39. // information about the log entry.
  40. map<string, string> labels = 13;
  41. // The log entry payload, which can be one of multiple types.
  42. oneof payload {
  43. // The log entry payload, represented as a protocol buffer that is
  44. // expressed as a JSON object. You can only pass `protoPayload`
  45. // values that belong to a set of approved types.
  46. google.protobuf.Any proto_payload = 2;
  47. // The log entry payload, represented as a Unicode string (UTF-8).
  48. string text_payload = 3;
  49. // The log entry payload, represented as a structure that
  50. // is expressed as a JSON object.
  51. google.protobuf.Struct struct_payload = 6;
  52. }
  53. }