google-cloud-logging 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +2 -1
- data/CHANGELOG.md +18 -0
- data/CONTRIBUTING.md +2 -3
- data/OVERVIEW.md +1 -2
- data/lib/google/cloud/logging/convert.rb +2 -3
- data/lib/google/cloud/logging/entry.rb +2 -2
- data/lib/google/cloud/logging/middleware.rb +1 -3
- data/lib/google/cloud/logging/rails.rb +4 -4
- data/lib/google/cloud/logging/resource.rb +1 -1
- data/lib/google/cloud/logging/service.rb +1 -1
- data/lib/google/cloud/logging/version.rb +1 -1
- data/lib/google/cloud/logging.rb +2 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ce6e5fb5af626f59f385c3dd166685c3e155594524d3aab4ec70bee7b13ed79
|
4
|
+
data.tar.gz: 5bc2d04a92d876b436cca0e06c46d982c244c6487fa403727f93fbede4b12e71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 141cdcd12d75863aff8435f06181116be32c80bec0ae8a4fe537992049a4ff050e3fd67a23363497a9f74077f00a74f08fb533a41ea3beb8c6cdb3ed32f6f674
|
7
|
+
data.tar.gz: b959a537794adaffee29b25dc37ed8c94f2093e59c9e108c0d8d7e0a1520edb795ab0071f58ac157a8f0d147f0da1b79b178c335e84d0e89ee8431ffd056fcfb
|
data/AUTHENTICATION.md
CHANGED
@@ -96,7 +96,8 @@ client = Google::Cloud::Logging.new
|
|
96
96
|
|
97
97
|
### Configuration
|
98
98
|
|
99
|
-
The **Project ID** and **Credentials JSON** can be configured
|
99
|
+
The **Project ID** and the path to the **Credentials JSON** file can be configured
|
100
|
+
instead of placing them in environment variables or providing them as arguments.
|
100
101
|
|
101
102
|
```ruby
|
102
103
|
require "google/cloud/logging"
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 2.3.0 (2022-06-30)
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Update minimum Ruby version to 2.6 ([#18444](https://github.com/googleapis/google-cloud-ruby/issues/18444))
|
8
|
+
|
9
|
+
### 2.2.2 / 2021-10-21
|
10
|
+
|
11
|
+
#### Documentation
|
12
|
+
|
13
|
+
* Add documentation for quota_project Configuration attribute
|
14
|
+
|
15
|
+
### 2.2.1 / 2021-07-08
|
16
|
+
|
17
|
+
#### Documentation
|
18
|
+
|
19
|
+
* Update AUTHENTICATION.md in handwritten packages
|
20
|
+
|
3
21
|
### 2.2.0 / 2021-03-10
|
4
22
|
|
5
23
|
#### Features
|
data/CONTRIBUTING.md
CHANGED
@@ -119,15 +119,14 @@ If you alter an example's title, you may encounter breaking tests.
|
|
119
119
|
### Logging Acceptance Tests
|
120
120
|
|
121
121
|
The Logging acceptance tests interact with the live service API. Follow the
|
122
|
-
instructions in the {file:AUTHENTICATION.md Authentication
|
122
|
+
instructions in the {file:AUTHENTICATION.md Authentication Guide} for enabling
|
123
123
|
the Logging API. Occasionally, some API features may not yet be generally
|
124
124
|
available, making it difficult for some contributors to successfully run the
|
125
125
|
entire acceptance test suite. However, please ensure that you do successfully
|
126
126
|
run acceptance tests for any code areas covered by your pull request.
|
127
127
|
|
128
128
|
To run the acceptance tests, first create and configure a project in the Google
|
129
|
-
Developers Console, as described in the {file:AUTHENTICATION.md Authentication
|
130
|
-
guide}. Be sure to download the JSON KEY file. Make note of the PROJECT_ID and
|
129
|
+
Developers Console, as described in the {file:AUTHENTICATION.md Authentication Guide}. Be sure to download the JSON KEY file. Make note of the PROJECT_ID and
|
131
130
|
the KEYFILE location on your system.
|
132
131
|
|
133
132
|
Before you can run the Logging acceptance tests, you must first create indexes
|
data/OVERVIEW.md
CHANGED
@@ -317,5 +317,4 @@ logging = Google::Cloud::Logging.new timeout: 120
|
|
317
317
|
## Additional information
|
318
318
|
|
319
319
|
Stackdriver Logging can be configured to be used in Rack applications or to use
|
320
|
-
gRPC's logging. To learn more, see the {file:INSTRUMENTATION.md Instrumentation
|
321
|
-
Guide} and {file:LOGGING.md Logging guide}.
|
320
|
+
gRPC's logging. To learn more, see the {file:INSTRUMENTATION.md Instrumentation Guide} and {file:LOGGING.md Logging guide}.
|
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
def self.hash_to_struct hash
|
25
25
|
# TODO: ArgumentError if hash is not a Hash
|
26
26
|
Google::Protobuf::Struct.new \
|
27
|
-
fields:
|
27
|
+
fields: hash.to_h { |k, v| [String(k), object_to_value(v)] }
|
28
28
|
end
|
29
29
|
|
30
30
|
##
|
@@ -65,8 +65,7 @@ module Google
|
|
65
65
|
if map.respond_to? :to_h
|
66
66
|
map.to_h
|
67
67
|
else
|
68
|
-
|
69
|
-
Hash[map.to_a]
|
68
|
+
map.to_a.to_h
|
70
69
|
end
|
71
70
|
end
|
72
71
|
end
|
@@ -487,10 +487,10 @@ module Google
|
|
487
487
|
def labels_grpc
|
488
488
|
return {} if labels.nil?
|
489
489
|
# Coerce symbols to strings
|
490
|
-
|
490
|
+
labels.to_h do |k, v|
|
491
491
|
v = String(v) if v.is_a? Symbol
|
492
492
|
[String(k), v]
|
493
|
-
end
|
493
|
+
end
|
494
494
|
end
|
495
495
|
|
496
496
|
##
|
@@ -288,9 +288,7 @@ module Google
|
|
288
288
|
##
|
289
289
|
# Fallback to default configuration values if not defined already
|
290
290
|
def init_default_config
|
291
|
-
configuration.project_id ||=
|
292
|
-
(Cloud.configure.project_id || Logging.default_project_id)
|
293
|
-
end
|
291
|
+
configuration.project_id ||= (Cloud.configure.project_id || Logging.default_project_id)
|
294
292
|
configuration.credentials ||= Cloud.configure.credentials
|
295
293
|
configuration.log_name ||= DEFAULT_LOG_NAME
|
296
294
|
configuration.log_name_map ||= DEFAULT_LOG_NAME_MAP
|
@@ -205,15 +205,15 @@ module Google
|
|
205
205
|
end
|
206
206
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
207
207
|
$stdout.puts "Note: Google::Cloud::Logging is disabled because " \
|
208
|
-
|
209
|
-
|
208
|
+
"it failed to authorize with the service. (#{e.message}) " \
|
209
|
+
"Falling back to the default Rails logger."
|
210
210
|
return false
|
211
211
|
end
|
212
212
|
|
213
213
|
if project_id.to_s.empty?
|
214
214
|
$stdout.puts "Note: Google::Cloud::Logging is disabled because " \
|
215
|
-
|
216
|
-
|
215
|
+
"the project ID could not be determined. " \
|
216
|
+
"Falling back to the default Rails logger."
|
217
217
|
return false
|
218
218
|
end
|
219
219
|
|
@@ -102,7 +102,7 @@ module Google
|
|
102
102
|
entry.log_name = log_path entry.log_name
|
103
103
|
end
|
104
104
|
resource = resource.to_grpc if resource
|
105
|
-
labels =
|
105
|
+
labels = labels.to_h { |k, v| [String(k), String(v)] } if labels
|
106
106
|
logging.write_log_entries entries: entries,
|
107
107
|
log_name: log_path(log_name),
|
108
108
|
resource: resource,
|
data/lib/google/cloud/logging.rb
CHANGED
@@ -124,6 +124,8 @@ module Google
|
|
124
124
|
# parameter `keyfile` is considered deprecated, but may also be used.)
|
125
125
|
# * `scope` - (String, Array<String>) The OAuth 2.0 scopes controlling
|
126
126
|
# the set of resources and operations that the connection can access.
|
127
|
+
# * `quota_project` - (String) The project ID for a project that can be
|
128
|
+
# used by client libraries for quota and billing purposes.
|
127
129
|
# * `timeout` - (Integer) Default timeout to use in requests.
|
128
130
|
# * `endpoint` - (String) Override of the endpoint host name, or `nil`
|
129
131
|
# to use the default endpoint.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -73,28 +73,28 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 1.
|
76
|
+
version: 1.26.1
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 1.
|
83
|
+
version: 1.26.1
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: minitest
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '5.
|
90
|
+
version: '5.16'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '5.
|
97
|
+
version: '5.16'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: minitest-autotest
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -290,14 +290,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
290
290
|
requirements:
|
291
291
|
- - ">="
|
292
292
|
- !ruby/object:Gem::Version
|
293
|
-
version: '2.
|
293
|
+
version: '2.6'
|
294
294
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
295
295
|
requirements:
|
296
296
|
- - ">="
|
297
297
|
- !ruby/object:Gem::Version
|
298
298
|
version: '0'
|
299
299
|
requirements: []
|
300
|
-
rubygems_version: 3.
|
300
|
+
rubygems_version: 3.3.14
|
301
301
|
signing_key:
|
302
302
|
specification_version: 4
|
303
303
|
summary: API Client library for Stackdriver Logging
|