Enabling gRPC Logging
To enable logging for this library, set the logger for the underlying
gRPC library. The logger
that you set may be a Ruby stdlib
Logger
as
shown below, or a
Google::Cloud::Logging::Logger
that will write logs to Stackdriver
Logging. See
grpc/logconfig.rb
and the gRPC
spec_helper.rb
for additional information.
Configuring a Ruby stdlib logger:
require "logger"
module MyLogger
LOGGER = Logger.new $stderr, level: Logger::WARN
def logger
LOGGER
end
end
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
module GRPC
extend MyLogger
end