google-cloud-app_hub-v1 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41f3c3f24855d32bb67a928f726c3f056d1c748eec84eac05fa1ea4637e1b556
4
- data.tar.gz: 34918006722b5758f380f65eb36a473706ff44c4a7e74ca0f0cbd8f1aeef8370
3
+ metadata.gz: 9a0d3cb825d26d2cec87910bf40755d48e04a635cf9b30189b8893531aae6976
4
+ data.tar.gz: 78939c69a3be1a6a36eee4d6c54b37c323ae8a950220e418cf68296bddbd4bf8
5
5
  SHA512:
6
- metadata.gz: 8c687b597a1c113b6f428ba49f85d3cdc7bb5fdcf7dd91ed190bd6cfc1c5abbea7ee46801436edaea29d0100867ead4649b899867a90f51cd303663ce10a348a
7
- data.tar.gz: d9b8bf0ade4ac2c215b1ec05c2fac9e20cea409a0bc4450286f087264e7bc51c3d8cb5e1bf51ac7f777960d65ec2718d2000634d19f66b8b8c1ec930f267732c
6
+ metadata.gz: 3918e8de322af8cb774009a46344ab8295d196441509885fdfbba566ceea09e77fc6f050cf0211be8dde9531baf941c11af6efa00d3e570af04a98b419484a84
7
+ data.tar.gz: 0d558d0695594d49d4dd3622ec42c64301958aa87d30167b79820a47f3edea307e69e32650a3da628b15cbfa5d0e5bad21af1180c13989e2f4eb836af466db55
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/app-hub/docs/overview)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/app_hub/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::AppHub::V1::AppHub::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).