Sha256: 1f8c0178c4a9e39d586d0cce3ec70d3879d23cbd2ca174db3504fbcc9be31d77

Contents?: true

Size: 976 Bytes

Versions: 83

Compression:

Stored size: 976 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/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

83 entries across 83 versions & 10 rubygems

Version Path
google-cloud-spanner-2.24.0 LOGGING.md
google-cloud-spanner-2.23.0 LOGGING.md
google-cloud-spanner-2.22.0 LOGGING.md
google-cloud-spanner-2.21.0 LOGGING.md
google-cloud-spanner-2.20.0 LOGGING.md
google-cloud-spanner-2.19.1 LOGGING.md
google-cloud-spanner-2.19.0 LOGGING.md
google-cloud-spanner-2.18.1 LOGGING.md
google-cloud-spanner-2.18.0 LOGGING.md
google-cloud-spanner-2.17.0 LOGGING.md
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/google-cloud-logging-2.3.2/LOGGING.md
google-cloud-spanner-2.16.1 LOGGING.md
google-cloud-spanner-2.16.0 LOGGING.md
google-cloud-logging-2.3.2 LOGGING.md
google-cloud-spanner-2.15.0 LOGGING.md
google-cloud-firestore-2.7.2 LOGGING.md
google-cloud-trace-0.42.1 LOGGING.md
google-cloud-logging-2.3.1 LOGGING.md
google-cloud-firestore-2.7.1 LOGGING.md
google-cloud-spanner-2.14.0 LOGGING.md