Sha256: 83a0b6435da5651bdcd228d742affd252393649dacd930d301d2ae06f89e5d7f

Contents?: true

Size: 1.01 KB

Versions: 75

Compression:

Stored size: 1.01 KB

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.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger)
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

75 entries across 75 versions & 10 rubygems

Version Path
google-cloud-firestore-1.0.0 LOGGING.md
google-cloud-datastore-1.5.5 LOGGING.md
google-cloud-bigtable-0.4.3 LOGGING.md
google-cloud-firestore-0.26.2 LOGGING.md
google-cloud-pubsub-0.37.1 LOGGING.md
google-cloud-trace-0.34.4 LOGGING.md
google-cloud-bigtable-0.4.2 LOGGING.md
google-cloud-spanner-1.9.4 LOGGING.md
google-cloud-logging-1.6.5 LOGGING.md
google-cloud-firestore-0.26.1 LOGGING.md
google-cloud-error_reporting-0.31.6 LOGGING.md
google-cloud-datastore-1.5.4 LOGGING.md
google-cloud-debugger-0.33.6 LOGGING.md
google-cloud-spanner-1.9.3 LOGGING.md
google-cloud-pubsub-0.37.0 LOGGING.md
google-cloud-bigtable-0.4.1 LOGGING.md
google-cloud-spanner-1.9.2 LOGGING.md
google-cloud-firestore-0.26.0 LOGGING.md
google-cloud-trace-0.34.3 LOGGING.md
google-cloud-datastore-1.5.3 LOGGING.md