logging.proto 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Copyright 2015 Google LLC
  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;
  16. option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
  17. option java_multiple_files = true;
  18. option java_outer_classname = "LoggingProto";
  19. option java_package = "com.google.api";
  20. option objc_class_prefix = "GAPI";
  21. // Logging configuration of the service.
  22. //
  23. // The following example shows how to configure logs to be sent to the
  24. // producer and consumer projects. In the example, the `activity_history`
  25. // log is sent to both the producer and consumer projects, whereas the
  26. // `purchase_history` log is only sent to the producer project.
  27. //
  28. // monitored_resources:
  29. // - type: library.googleapis.com/branch
  30. // labels:
  31. // - key: /city
  32. // description: The city where the library branch is located in.
  33. // - key: /name
  34. // description: The name of the branch.
  35. // logs:
  36. // - name: activity_history
  37. // labels:
  38. // - key: /customer_id
  39. // - name: purchase_history
  40. // logging:
  41. // producer_destinations:
  42. // - monitored_resource: library.googleapis.com/branch
  43. // logs:
  44. // - activity_history
  45. // - purchase_history
  46. // consumer_destinations:
  47. // - monitored_resource: library.googleapis.com/branch
  48. // logs:
  49. // - activity_history
  50. message Logging {
  51. // Configuration of a specific logging destination (the producer project
  52. // or the consumer project).
  53. message LoggingDestination {
  54. // The monitored resource type. The type must be defined in the
  55. // [Service.monitored_resources][google.api.Service.monitored_resources] section.
  56. string monitored_resource = 3;
  57. // Names of the logs to be sent to this destination. Each name must
  58. // be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
  59. // not a domain scoped name, it will be automatically prefixed with
  60. // the service name followed by "/".
  61. repeated string logs = 1;
  62. }
  63. // Logging configurations for sending logs to the producer project.
  64. // There can be multiple producer destinations, each one must have a
  65. // different monitored resource type. A log can be used in at most
  66. // one producer destination.
  67. repeated LoggingDestination producer_destinations = 1;
  68. // Logging configurations for sending logs to the consumer project.
  69. // There can be multiple consumer destinations, each one must have a
  70. // different monitored resource type. A log can be used in at most
  71. // one consumer destination.
  72. repeated LoggingDestination consumer_destinations = 2;
  73. }