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.0 LOGGING.md
google-cloud-debugger-0.35.0 LOGGING.md
google-cloud-spanner-1.12.0 LOGGING.md
google-cloud-datastore-1.7.0 LOGGING.md
google-cloud-trace-0.36.0 LOGGING.md
google-cloud-pubsub-1.1.0 LOGGING.md
google-cloud-bigtable-0.7.0 LOGGING.md
google-cloud-error_reporting-0.32.1 LOGGING.md
google-cloud-pubsub-1.0.2 LOGGING.md
google-cloud-spanner-1.11.0 LOGGING.md
google-cloud-logging-1.8.0 LOGGING.md
google-cloud-bigtable-0.6.2 LOGGING.md
google-cloud-pubsub-1.0.1 LOGGING.md
google-cloud-pubsub-1.0.0 LOGGING.md
google-cloud-pubsub-0.39.3 LOGGING.md
google-cloud-pubsub-0.39.2 LOGGING.md
google-cloud-bigtable-0.6.1 LOGGING.md
google-cloud-spanner-1.10.1 LOGGING.md
google-cloud-pubsub-0.39.1 LOGGING.md
google-cloud-spanner-1.10.0 LOGGING.md