aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/ruby/lib/grpc/logconfig.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ruby/lib/grpc/logconfig.rb b/src/ruby/lib/grpc/logconfig.rb
index 2bb7c86d5e..6b442febcb 100644
--- a/src/ruby/lib/grpc/logconfig.rb
+++ b/src/ruby/lib/grpc/logconfig.rb
@@ -54,5 +54,6 @@ module GRPC
LOGGER = NoopLogger.new
end
- include DefaultLogger unless method_defined?(:logger)
+ # Inject the noop #logger if no module-level logger method has been injected.
+ extend DefaultLogger unless methods.include?(:logger)
end