google-cloud-logging - Class Google::Cloud::Logging::Credentials (v2.2.2)

Reference documentation and code samples for the google-cloud-logging class Google::Cloud::Logging::Credentials.

Credentials

Represents the authentication and authorization used to connect to the Stackdriver Logging API.

Inherits

  • Google::Cloud::Logging::V2::LoggingService::Credentials

Example

require "google/cloud/logging"

keyfile = "/path/to/keyfile.json"
creds = Google::Cloud::Logging::Credentials.new keyfile

logging = Google::Cloud::Logging.new(
  project_id: "my-project",
  credentials: creds
)

logging.project_id #=> "my-project"