Class: Google::Cloud::Logging::Credentials

Inherits:
V2::LoggingService::Credentials
  • Object
show all
Defined in:
lib/google/cloud/logging/credentials.rb

Overview

Credentials

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

Examples:

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"