Cloud Logging API - Class Google::Cloud::Logging::Credentials (v2.4.0)

Reference documentation and code samples for the Cloud Logging API 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"