google-cloud-managed_kafka-v1 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f02966bb29882d46e406e95df39f9933f6c9d4d7a263971fc9455e01846fadc0
4
- data.tar.gz: 50e37934038fed5a3e0d98ebcd88a2a9a38c3dba9580ebbf7a6532c7e87697f7
3
+ metadata.gz: a47e726021fe5724d64480fd8b409cdfe8e83c7eb42237efe475f273522a5815
4
+ data.tar.gz: 268db2f077b6569f531b1c1a3d4d42b4279550227e3a7127cc16c976d40a2ad5
5
5
  SHA512:
6
- metadata.gz: 0f5971a5b4c502b350ae6a48716b48890475183ab7e33cad9a5b625639a5c907a818e4109bcd7e1a66d4b01c58f755be7283ccc866fa2e9aca871fe04acda50f
7
- data.tar.gz: a67b250229743969b18e84a6fe3b3c2dbf271a7f24bc14882c0ba377c460efc87b4741fad40b858e4cbe3a58e1310b643c028df2c9f9fa76acfc69a6336b4f40
6
+ metadata.gz: 80c5eb115f828c14a723b9be6014142bbbab2937540920c658fdc41925bbb9fa9e3c2356ad6fc5ae4b68efe8103192743031020733ee085d96f53b713eb6101f
7
+ data.tar.gz: a9bc82cc0739bc5938f555afb81ec03b62e98a8c6cb650c2a59ca003fbb269ecb48c8e0618c68b0eebb184e01f4ce46f0c16a9f71d7bda3ba63bfcc4e8892cda
data/README.md CHANGED
@@ -42,33 +42,43 @@ for class and method documentation.
42
42
  See also the [Product Documentation](https://cloud.google.com/managed-service-for-apache-kafka/docs)
43
43
  for general usage information.
44
44
 
45
- ## Enabling Logging
46
-
47
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
48
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
49
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
50
- 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)
51
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
52
-
53
- Configuring a Ruby stdlib logger:
45
+ ## Debug Logging
46
+
47
+ This library comes with opt-in Debug Logging that can help you troubleshoot
48
+ your application's integration with the API. When logging is activated, key
49
+ events such as requests and responses, along with data payloads and metadata
50
+ such as headers and client configuration, are logged to the standard error
51
+ stream.
52
+
53
+ **WARNING:** Client Library Debug Logging includes your data payloads in
54
+ plaintext, which could include sensitive data such as PII for yourself or your
55
+ customers, private keys, or other security data that could be compromising if
56
+ leaked. Always practice good data hygiene with your application logs, and follow
57
+ the principle of least access. Google also recommends that Client Library Debug
58
+ Logging be enabled only temporarily during active debugging, and not used
59
+ permanently in production.
60
+
61
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
62
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
63
+ list of client library gem names. This will select the default logging behavior,
64
+ which writes logs to the standard error stream. On a local workstation, this may
65
+ result in logs appearing on the console. When running on a Google Cloud hosting
66
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
67
+ results in logs appearing alongside your application logs in the
68
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
69
+
70
+ You can customize logging by modifying the `logger` configuration when
71
+ constructing a client object. For example:
54
72
 
55
73
  ```ruby
74
+ require "google/cloud/managed_kafka/v1"
56
75
  require "logger"
57
76
 
58
- module MyLogger
59
- LOGGER = Logger.new $stderr, level: Logger::WARN
60
- def logger
61
- LOGGER
62
- end
63
- end
64
-
65
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
66
- module GRPC
67
- extend MyLogger
77
+ client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config|
78
+ config.logger = Logger.new "my-app.log"
68
79
  end
69
80
  ```
70
81
 
71
-
72
82
  ## Google Cloud Samples
73
83
 
74
84
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -212,14 +212,26 @@ module Google
212
212
  universe_domain: @config.universe_domain,
213
213
  channel_args: @config.channel_args,
214
214
  interceptors: @config.interceptors,
215
- channel_pool_config: @config.channel_pool
215
+ channel_pool_config: @config.channel_pool,
216
+ logger: @config.logger
216
217
  )
217
218
 
219
+ @managed_kafka_stub.stub_logger&.info do |entry|
220
+ entry.set_system_name
221
+ entry.set_service
222
+ entry.message = "Created client for #{entry.service}"
223
+ entry.set_credentials_fields credentials
224
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
225
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
226
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
227
+ end
228
+
218
229
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
219
230
  config.credentials = credentials
220
231
  config.quota_project = @quota_project_id
221
232
  config.endpoint = @managed_kafka_stub.endpoint
222
233
  config.universe_domain = @managed_kafka_stub.universe_domain
234
+ config.logger = @managed_kafka_stub.logger if config.respond_to? :logger=
223
235
  end
224
236
  end
225
237
 
@@ -237,6 +249,15 @@ module Google
237
249
  #
238
250
  attr_reader :location_client
239
251
 
252
+ ##
253
+ # The logger used for request/response debug logging.
254
+ #
255
+ # @return [Logger]
256
+ #
257
+ def logger
258
+ @managed_kafka_stub.logger
259
+ end
260
+
240
261
  # Service calls
241
262
 
242
263
  ##
@@ -339,7 +360,7 @@ module Google
339
360
  @managed_kafka_stub.call_rpc :list_clusters, request, options: options do |response, operation|
340
361
  response = ::Gapic::PagedEnumerable.new @managed_kafka_stub, :list_clusters, request, response, operation, options
341
362
  yield response, operation if block_given?
342
- return response
363
+ throw :response, response
343
364
  end
344
365
  rescue ::GRPC::BadStatus => e
345
366
  raise ::Google::Cloud::Error.from_error(e)
@@ -425,7 +446,6 @@ module Google
425
446
 
426
447
  @managed_kafka_stub.call_rpc :get_cluster, request, options: options do |response, operation|
427
448
  yield response, operation if block_given?
428
- return response
429
449
  end
430
450
  rescue ::GRPC::BadStatus => e
431
451
  raise ::Google::Cloud::Error.from_error(e)
@@ -545,7 +565,7 @@ module Google
545
565
  @managed_kafka_stub.call_rpc :create_cluster, request, options: options do |response, operation|
546
566
  response = ::Gapic::Operation.new response, @operations_client, options: options
547
567
  yield response, operation if block_given?
548
- return response
568
+ throw :response, response
549
569
  end
550
570
  rescue ::GRPC::BadStatus => e
551
571
  raise ::Google::Cloud::Error.from_error(e)
@@ -660,7 +680,7 @@ module Google
660
680
  @managed_kafka_stub.call_rpc :update_cluster, request, options: options do |response, operation|
661
681
  response = ::Gapic::Operation.new response, @operations_client, options: options
662
682
  yield response, operation if block_given?
663
- return response
683
+ throw :response, response
664
684
  end
665
685
  rescue ::GRPC::BadStatus => e
666
686
  raise ::Google::Cloud::Error.from_error(e)
@@ -769,7 +789,7 @@ module Google
769
789
  @managed_kafka_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
770
790
  response = ::Gapic::Operation.new response, @operations_client, options: options
771
791
  yield response, operation if block_given?
772
- return response
792
+ throw :response, response
773
793
  end
774
794
  rescue ::GRPC::BadStatus => e
775
795
  raise ::Google::Cloud::Error.from_error(e)
@@ -871,7 +891,7 @@ module Google
871
891
  @managed_kafka_stub.call_rpc :list_topics, request, options: options do |response, operation|
872
892
  response = ::Gapic::PagedEnumerable.new @managed_kafka_stub, :list_topics, request, response, operation, options
873
893
  yield response, operation if block_given?
874
- return response
894
+ throw :response, response
875
895
  end
876
896
  rescue ::GRPC::BadStatus => e
877
897
  raise ::Google::Cloud::Error.from_error(e)
@@ -959,7 +979,6 @@ module Google
959
979
 
960
980
  @managed_kafka_stub.call_rpc :get_topic, request, options: options do |response, operation|
961
981
  yield response, operation if block_given?
962
- return response
963
982
  end
964
983
  rescue ::GRPC::BadStatus => e
965
984
  raise ::Google::Cloud::Error.from_error(e)
@@ -1055,7 +1074,6 @@ module Google
1055
1074
 
1056
1075
  @managed_kafka_stub.call_rpc :create_topic, request, options: options do |response, operation|
1057
1076
  yield response, operation if block_given?
1058
- return response
1059
1077
  end
1060
1078
  rescue ::GRPC::BadStatus => e
1061
1079
  raise ::Google::Cloud::Error.from_error(e)
@@ -1147,7 +1165,6 @@ module Google
1147
1165
 
1148
1166
  @managed_kafka_stub.call_rpc :update_topic, request, options: options do |response, operation|
1149
1167
  yield response, operation if block_given?
1150
- return response
1151
1168
  end
1152
1169
  rescue ::GRPC::BadStatus => e
1153
1170
  raise ::Google::Cloud::Error.from_error(e)
@@ -1234,7 +1251,6 @@ module Google
1234
1251
 
1235
1252
  @managed_kafka_stub.call_rpc :delete_topic, request, options: options do |response, operation|
1236
1253
  yield response, operation if block_given?
1237
- return response
1238
1254
  end
1239
1255
  rescue ::GRPC::BadStatus => e
1240
1256
  raise ::Google::Cloud::Error.from_error(e)
@@ -1337,7 +1353,7 @@ module Google
1337
1353
  @managed_kafka_stub.call_rpc :list_consumer_groups, request, options: options do |response, operation|
1338
1354
  response = ::Gapic::PagedEnumerable.new @managed_kafka_stub, :list_consumer_groups, request, response, operation, options
1339
1355
  yield response, operation if block_given?
1340
- return response
1356
+ throw :response, response
1341
1357
  end
1342
1358
  rescue ::GRPC::BadStatus => e
1343
1359
  raise ::Google::Cloud::Error.from_error(e)
@@ -1424,7 +1440,6 @@ module Google
1424
1440
 
1425
1441
  @managed_kafka_stub.call_rpc :get_consumer_group, request, options: options do |response, operation|
1426
1442
  yield response, operation if block_given?
1427
- return response
1428
1443
  end
1429
1444
  rescue ::GRPC::BadStatus => e
1430
1445
  raise ::Google::Cloud::Error.from_error(e)
@@ -1516,7 +1531,6 @@ module Google
1516
1531
 
1517
1532
  @managed_kafka_stub.call_rpc :update_consumer_group, request, options: options do |response, operation|
1518
1533
  yield response, operation if block_given?
1519
- return response
1520
1534
  end
1521
1535
  rescue ::GRPC::BadStatus => e
1522
1536
  raise ::Google::Cloud::Error.from_error(e)
@@ -1603,7 +1617,6 @@ module Google
1603
1617
 
1604
1618
  @managed_kafka_stub.call_rpc :delete_consumer_group, request, options: options do |response, operation|
1605
1619
  yield response, operation if block_given?
1606
- return response
1607
1620
  end
1608
1621
  rescue ::GRPC::BadStatus => e
1609
1622
  raise ::Google::Cloud::Error.from_error(e)
@@ -1692,6 +1705,11 @@ module Google
1692
1705
  # default endpoint URL. The default value of nil uses the environment
1693
1706
  # universe (usually the default "googleapis.com" universe).
1694
1707
  # @return [::String,nil]
1708
+ # @!attribute [rw] logger
1709
+ # A custom logger to use for request/response debug logging, or the value
1710
+ # `:default` (the default) to construct a default logger, or `nil` to
1711
+ # explicitly disable logging.
1712
+ # @return [::Logger,:default,nil]
1695
1713
  #
1696
1714
  class Configuration
1697
1715
  extend ::Gapic::Config
@@ -1716,6 +1734,7 @@ module Google
1716
1734
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1717
1735
  config_attr :quota_project, nil, ::String, nil
1718
1736
  config_attr :universe_domain, nil, ::String, nil
1737
+ config_attr :logger, :default, ::Logger, nil, :default
1719
1738
 
1720
1739
  # @private
1721
1740
  def initialize parent_config = nil
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -688,6 +679,11 @@ module Google
688
679
  # default endpoint URL. The default value of nil uses the environment
689
680
  # universe (usually the default "googleapis.com" universe).
690
681
  # @return [::String,nil]
682
+ # @!attribute [rw] logger
683
+ # A custom logger to use for request/response debug logging, or the value
684
+ # `:default` (the default) to construct a default logger, or `nil` to
685
+ # explicitly disable logging.
686
+ # @return [::Logger,:default,nil]
691
687
  #
692
688
  class Configuration
693
689
  extend ::Gapic::Config
@@ -712,6 +708,7 @@ module Google
712
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
709
  config_attr :quota_project, nil, ::String, nil
714
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
715
712
 
716
713
  # @private
717
714
  def initialize parent_config = nil
@@ -205,15 +205,27 @@ module Google
205
205
  endpoint: @config.endpoint,
206
206
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
207
207
  universe_domain: @config.universe_domain,
208
- credentials: credentials
208
+ credentials: credentials,
209
+ logger: @config.logger
209
210
  )
210
211
 
212
+ @managed_kafka_stub.logger(stub: true)&.info do |entry|
213
+ entry.set_system_name
214
+ entry.set_service
215
+ entry.message = "Created client for #{entry.service}"
216
+ entry.set_credentials_fields credentials
217
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
218
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
219
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
220
+ end
221
+
211
222
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
212
223
  config.credentials = credentials
213
224
  config.quota_project = @quota_project_id
214
225
  config.endpoint = @managed_kafka_stub.endpoint
215
226
  config.universe_domain = @managed_kafka_stub.universe_domain
216
227
  config.bindings_override = @config.bindings_override
228
+ config.logger = @managed_kafka_stub.logger if config.respond_to? :logger=
217
229
  end
218
230
  end
219
231
 
@@ -231,6 +243,15 @@ module Google
231
243
  #
232
244
  attr_reader :location_client
233
245
 
246
+ ##
247
+ # The logger used for request/response debug logging.
248
+ #
249
+ # @return [Logger]
250
+ #
251
+ def logger
252
+ @managed_kafka_stub.logger
253
+ end
254
+
234
255
  # Service calls
235
256
 
236
257
  ##
@@ -325,7 +346,6 @@ module Google
325
346
 
326
347
  @managed_kafka_stub.list_clusters request, options do |result, operation|
327
348
  yield result, operation if block_given?
328
- return result
329
349
  end
330
350
  rescue ::Gapic::Rest::Error => e
331
351
  raise ::Google::Cloud::Error.from_error(e)
@@ -404,7 +424,6 @@ module Google
404
424
 
405
425
  @managed_kafka_stub.get_cluster request, options do |result, operation|
406
426
  yield result, operation if block_given?
407
- return result
408
427
  end
409
428
  rescue ::Gapic::Rest::Error => e
410
429
  raise ::Google::Cloud::Error.from_error(e)
@@ -517,7 +536,7 @@ module Google
517
536
  @managed_kafka_stub.create_cluster request, options do |result, operation|
518
537
  result = ::Gapic::Operation.new result, @operations_client, options: options
519
538
  yield result, operation if block_given?
520
- return result
539
+ throw :response, result
521
540
  end
522
541
  rescue ::Gapic::Rest::Error => e
523
542
  raise ::Google::Cloud::Error.from_error(e)
@@ -625,7 +644,7 @@ module Google
625
644
  @managed_kafka_stub.update_cluster request, options do |result, operation|
626
645
  result = ::Gapic::Operation.new result, @operations_client, options: options
627
646
  yield result, operation if block_given?
628
- return result
647
+ throw :response, result
629
648
  end
630
649
  rescue ::Gapic::Rest::Error => e
631
650
  raise ::Google::Cloud::Error.from_error(e)
@@ -727,7 +746,7 @@ module Google
727
746
  @managed_kafka_stub.delete_cluster request, options do |result, operation|
728
747
  result = ::Gapic::Operation.new result, @operations_client, options: options
729
748
  yield result, operation if block_given?
730
- return result
749
+ throw :response, result
731
750
  end
732
751
  rescue ::Gapic::Rest::Error => e
733
752
  raise ::Google::Cloud::Error.from_error(e)
@@ -822,7 +841,7 @@ module Google
822
841
  @managed_kafka_stub.list_topics request, options do |result, operation|
823
842
  result = ::Gapic::Rest::PagedEnumerable.new @managed_kafka_stub, :list_topics, "topics", request, result, options
824
843
  yield result, operation if block_given?
825
- return result
844
+ throw :response, result
826
845
  end
827
846
  rescue ::Gapic::Rest::Error => e
828
847
  raise ::Google::Cloud::Error.from_error(e)
@@ -903,7 +922,6 @@ module Google
903
922
 
904
923
  @managed_kafka_stub.get_topic request, options do |result, operation|
905
924
  yield result, operation if block_given?
906
- return result
907
925
  end
908
926
  rescue ::Gapic::Rest::Error => e
909
927
  raise ::Google::Cloud::Error.from_error(e)
@@ -992,7 +1010,6 @@ module Google
992
1010
 
993
1011
  @managed_kafka_stub.create_topic request, options do |result, operation|
994
1012
  yield result, operation if block_given?
995
- return result
996
1013
  end
997
1014
  rescue ::Gapic::Rest::Error => e
998
1015
  raise ::Google::Cloud::Error.from_error(e)
@@ -1077,7 +1094,6 @@ module Google
1077
1094
 
1078
1095
  @managed_kafka_stub.update_topic request, options do |result, operation|
1079
1096
  yield result, operation if block_given?
1080
- return result
1081
1097
  end
1082
1098
  rescue ::Gapic::Rest::Error => e
1083
1099
  raise ::Google::Cloud::Error.from_error(e)
@@ -1157,7 +1173,6 @@ module Google
1157
1173
 
1158
1174
  @managed_kafka_stub.delete_topic request, options do |result, operation|
1159
1175
  yield result, operation if block_given?
1160
- return result
1161
1176
  end
1162
1177
  rescue ::Gapic::Rest::Error => e
1163
1178
  raise ::Google::Cloud::Error.from_error(e)
@@ -1253,7 +1268,7 @@ module Google
1253
1268
  @managed_kafka_stub.list_consumer_groups request, options do |result, operation|
1254
1269
  result = ::Gapic::Rest::PagedEnumerable.new @managed_kafka_stub, :list_consumer_groups, "consumer_groups", request, result, options
1255
1270
  yield result, operation if block_given?
1256
- return result
1271
+ throw :response, result
1257
1272
  end
1258
1273
  rescue ::Gapic::Rest::Error => e
1259
1274
  raise ::Google::Cloud::Error.from_error(e)
@@ -1333,7 +1348,6 @@ module Google
1333
1348
 
1334
1349
  @managed_kafka_stub.get_consumer_group request, options do |result, operation|
1335
1350
  yield result, operation if block_given?
1336
- return result
1337
1351
  end
1338
1352
  rescue ::Gapic::Rest::Error => e
1339
1353
  raise ::Google::Cloud::Error.from_error(e)
@@ -1418,7 +1432,6 @@ module Google
1418
1432
 
1419
1433
  @managed_kafka_stub.update_consumer_group request, options do |result, operation|
1420
1434
  yield result, operation if block_given?
1421
- return result
1422
1435
  end
1423
1436
  rescue ::Gapic::Rest::Error => e
1424
1437
  raise ::Google::Cloud::Error.from_error(e)
@@ -1498,7 +1511,6 @@ module Google
1498
1511
 
1499
1512
  @managed_kafka_stub.delete_consumer_group request, options do |result, operation|
1500
1513
  yield result, operation if block_given?
1501
- return result
1502
1514
  end
1503
1515
  rescue ::Gapic::Rest::Error => e
1504
1516
  raise ::Google::Cloud::Error.from_error(e)
@@ -1578,6 +1590,11 @@ module Google
1578
1590
  # default endpoint URL. The default value of nil uses the environment
1579
1591
  # universe (usually the default "googleapis.com" universe).
1580
1592
  # @return [::String,nil]
1593
+ # @!attribute [rw] logger
1594
+ # A custom logger to use for request/response debug logging, or the value
1595
+ # `:default` (the default) to construct a default logger, or `nil` to
1596
+ # explicitly disable logging.
1597
+ # @return [::Logger,:default,nil]
1581
1598
  #
1582
1599
  class Configuration
1583
1600
  extend ::Gapic::Config
@@ -1606,6 +1623,7 @@ module Google
1606
1623
  # by the host service.
1607
1624
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1608
1625
  config_attr :bindings_override, {}, ::Hash, nil
1626
+ config_attr :logger, :default, ::Logger, nil, :default
1609
1627
 
1610
1628
  # @private
1611
1629
  def initialize parent_config = nil