Sha256: 339e07c950b3e75a4a2f02cfecaa56dcdc74b3a7442e22e6fa7c5b38efd8ccc4

Contents?: true

Size: 982 Bytes

Versions: 156

Compression:

Stored size: 982 Bytes

Contents

# Enabling gRPC Logging

To enable logging for this library, set the logger for the underlying
[gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger
that you set may be a Ruby stdlib
[`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as
shown below, or a
[`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
that will write logs to [Stackdriver
Logging](https://cloud.google.com/logging/). See
[grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
and the gRPC
[spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb)
for additional information.

Configuring a Ruby stdlib logger:

```ruby
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
```

Version data entries

156 entries across 156 versions & 9 rubygems

Version Path
google-cloud-logging-1.9.5 LOGGING.md
google-cloud-spanner-1.14.0 LOGGING.md
google-cloud-pubsub-1.3.1 LOGGING.md
google-cloud-bigtable-1.1.0 LOGGING.md
google-cloud-pubsub-1.3.0 LOGGING.md
google-cloud-pubsub-1.2.2 LOGGING.md
google-cloud-error_reporting-0.34.2 LOGGING.md
google-cloud-pubsub-1.2.1 LOGGING.md
google-cloud-datastore-1.7.3 LOGGING.md
google-cloud-logging-1.9.4 LOGGING.md
google-cloud-debugger-0.35.2 LOGGING.md
google-cloud-firestore-1.2.4 LOGGING.md
google-cloud-spanner-1.13.1 LOGGING.md
google-cloud-trace-0.37.1 LOGGING.md
google-cloud-bigtable-1.0.2 LOGGING.md
google-cloud-bigtable-1.0.1 LOGGING.md
google-cloud-pubsub-1.2.0 LOGGING.md
google-cloud-firestore-1.2.3 LOGGING.md
google-cloud-spanner-1.13.0 LOGGING.md
google-cloud-logging-1.9.3 LOGGING.md