google-cloud-logging 2.3.2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 473b09d591b64edc8378ad490294f2fd02d87840f87a3e3142f8558d4863d420
4
- data.tar.gz: 55095632346aca38160e35c163d52b96ead2b8bf9838f789f0f23ab73fd8bf3e
3
+ metadata.gz: e7a6c05dbac7a0928939075dfec4678ba3cb2e0c41d05470ab7cdd311c504d4a
4
+ data.tar.gz: 7e8bd405cc84cd959da4fbd2e7b05d14c979ec1e241760399a06c7dfade2afbf
5
5
  SHA512:
6
- metadata.gz: 18f459f8c336ea18deefe4abd05e794869a9e7b7f1e56bc589987de11780cf87498275a39aa30bd2a32964b4d039c5fa143ca96962f83d939bb2c8b14c1a00f0
7
- data.tar.gz: de57958405f5f8fe2eab91eb63def2d3b06b2143eaba9ad415140b47967a6535d53675d7758acc6c246766cbfd4a72b33428b6cda881b184df5f33fa85488576
6
+ metadata.gz: 5c536324c39f2ed7b0395ee131cab52fcd4030b016315d5563182c0671efa2fe3ebca6ac7455df6391cac8d9b2530429b52beab0b60c6654c5a3355bf7c8efd5
7
+ data.tar.gz: ecc498c787dcdecee0a8aa31a5e190925ea2738578b7d5d45482b8d8800886e9cd702d23fdd810c2ae84863ee1570d5766b171f8f158a5d525a4a2e17a9f6165
data/AUTHENTICATION.md CHANGED
@@ -125,15 +125,6 @@ To configure your system for this, simply:
125
125
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
126
126
  *should* only be used during development.
127
127
 
128
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
129
- [dev-console]: https://console.cloud.google.com/project
130
-
131
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
132
-
133
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
134
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
135
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
136
-
137
128
  ## Creating a Service Account
138
129
 
139
130
  Google Cloud requires a **Project ID** and **Service Account Credentials** to
@@ -144,31 +135,22 @@ If you are not running this client within [Google Cloud Platform
144
135
  environments](#google-cloud-platform-environments), you need a Google
145
136
  Developers service account.
146
137
 
147
- 1. Visit the [Google Developers Console][dev-console].
138
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
148
139
  1. Create a new project or click on an existing project.
149
- 1. Activate the slide-out navigation tray and select **API Manager**. From
140
+ 1. Activate the menu in the upper left and select **APIs & Services**. From
150
141
  here, you will enable the APIs that your application requires.
151
142
 
152
- ![Enable the APIs that your application requires][enable-apis]
153
-
154
143
  *Note: You may need to enable billing in order to use these services.*
155
144
 
156
145
  1. Select **Credentials** from the side navigation.
157
146
 
158
- You should see a screen like one of the following.
159
-
160
- ![Create a new service account][create-new-service-account]
161
-
162
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
163
-
164
- Find the "Add credentials" drop down and select "Service account" to be
165
- guided through downloading a new JSON key file.
166
-
167
- If you want to re-use an existing service account, you can easily generate a
168
- new key file. Just select the account you wish to re-use, and click "Generate
169
- new JSON key":
147
+ Find the "Create credentials" drop down near the top of the page, and select
148
+ "Service account" to be guided through downloading a new JSON key file.
170
149
 
171
- ![Re-use an existing service account][reuse-service-account]
150
+ If you want to re-use an existing service account, you can easily generate
151
+ a new key file. Just select the account you wish to re-use click the pencil
152
+ tool on the right side to edit the service account, select the **Keys** tab,
153
+ and then select **Add Key**.
172
154
 
173
155
  The key file you download will be used by this library to authenticate API
174
156
  requests and should be stored in a secure location.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release History
2
2
 
3
+ ### 2.4.0 (2024-03-07)
4
+
5
+ #### Features
6
+
7
+ * Update minimum supported Ruby version to 2.7 ([#25298](https://github.com/googleapis/google-cloud-ruby/issues/25298))
8
+
9
+ ### 2.3.3 (2023-05-19)
10
+
11
+ #### Documentation
12
+
13
+ * Fixed broken links in authentication documentation ([#21619](https://github.com/googleapis/google-cloud-ruby/issues/21619))
14
+
3
15
  ### 2.3.2 (2022-10-18)
4
16
 
5
17
  #### Bug Fixes
data/LOGGING.md CHANGED
@@ -3,7 +3,7 @@
3
3
  To enable logging for this library, set the logger for the underlying
4
4
  [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger
5
5
  that you set may be a Ruby stdlib
6
- [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as
6
+ [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as
7
7
  shown below, or a
8
8
  [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
9
9
  that will write logs to [Stackdriver
data/OVERVIEW.md CHANGED
@@ -266,7 +266,7 @@ async.write_entries [entry1, entry2],
266
266
  ### Creating a Ruby Logger implementation
267
267
 
268
268
  If your environment requires a logger instance that is API-compatible with
269
- Ruby's standard library [Logger](http://ruby-doc.org/stdlib/libdoc/logger/rdoc),
269
+ Ruby's standard library [Logger](https://ruby-doc.org/current/stdlibs/logger/),
270
270
  you can use {Google::Cloud::Logging::Project#logger Project#logger} to create
271
271
  one.
272
272
 
@@ -164,7 +164,7 @@ module Google
164
164
 
165
165
  ##
166
166
  # Creates a logger instance that is API-compatible with Ruby's standard
167
- # library [Logger](http://ruby-doc.org/stdlib/libdoc/logger/rdoc).
167
+ # library [Logger](https://ruby-doc.org/current/stdlibs/logger/).
168
168
  #
169
169
  # The logger will use AsyncWriter to transmit log entries on a
170
170
  # background thread.
@@ -288,7 +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 ||= (Cloud.configure.project_id || Logging.default_project_id)
291
+ configuration.project_id ||= Cloud.configure.project_id || Logging.default_project_id
292
292
  configuration.credentials ||= Cloud.configure.credentials
293
293
  configuration.log_name ||= DEFAULT_LOG_NAME
294
294
  configuration.log_name_map ||= DEFAULT_LOG_NAME_MAP
@@ -398,7 +398,7 @@ module Google
398
398
 
399
399
  ##
400
400
  # Creates a logger instance that is API-compatible with Ruby's standard
401
- # library [Logger](http://ruby-doc.org/stdlib/libdoc/logger/rdoc).
401
+ # library [Logger](https://ruby-doc.org/current/stdlibs/logger/).
402
402
  #
403
403
  # The logger will create a new AsyncWriter object to transmit log
404
404
  # entries on a background thread.
@@ -41,7 +41,7 @@ module Google
41
41
 
42
42
  def logging
43
43
  return mocked_logging if mocked_logging
44
- @logging ||= \
44
+ @logging ||=
45
45
  V2::LoggingService::Client.new do |config|
46
46
  config.credentials = credentials if credentials
47
47
  config.timeout = timeout if timeout
@@ -55,7 +55,7 @@ module Google
55
55
 
56
56
  def sinks
57
57
  return mocked_sinks if mocked_sinks
58
- @sinks ||= \
58
+ @sinks ||=
59
59
  V2::ConfigService::Client.new do |config|
60
60
  config.credentials = credentials if credentials
61
61
  config.timeout = timeout if timeout
@@ -69,7 +69,7 @@ module Google
69
69
 
70
70
  def metrics
71
71
  return mocked_metrics if mocked_metrics
72
- @metrics ||= \
72
+ @metrics ||=
73
73
  V2::MetricsService::Client.new do |config|
74
74
  config.credentials = credentials if credentials
75
75
  config.timeout = timeout if timeout
@@ -135,7 +135,7 @@ module Google
135
135
  sink = Google::Cloud::Logging::V2::LogSink.new(
136
136
  {
137
137
  name: name, destination: destination, filter: filter
138
- }.delete_if { |_, v| v.nil? }
138
+ }.compact
139
139
  )
140
140
  sinks.create_sink parent: project_path,
141
141
  sink: sink,
@@ -150,7 +150,7 @@ module Google
150
150
  sink = Google::Cloud::Logging::V2::LogSink.new(
151
151
  {
152
152
  name: name, destination: destination, filter: filter
153
- }.delete_if { |_, v| v.nil? }
153
+ }.compact
154
154
  )
155
155
  sinks.update_sink sink_name: sink_path(name),
156
156
  sink: sink,
@@ -171,7 +171,7 @@ module Google
171
171
  def create_metric name, filter, description
172
172
  metric = Google::Cloud::Logging::V2::LogMetric.new(
173
173
  { name: name, description: description,
174
- filter: filter }.delete_if { |_, v| v.nil? }
174
+ filter: filter }.compact
175
175
  )
176
176
  metrics.create_log_metric parent: project_path, metric: metric
177
177
  end
@@ -183,7 +183,7 @@ module Google
183
183
  def update_metric name, description, filter
184
184
  metric = Google::Cloud::Logging::V2::LogMetric.new(
185
185
  { name: name, description: description,
186
- filter: filter }.delete_if { |_, v| v.nil? }
186
+ filter: filter }.compact
187
187
  )
188
188
  metrics.update_log_metric metric_name: metric_path(name), metric: metric
189
189
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Logging
19
- VERSION = "2.3.2".freeze
19
+ VERSION = "2.4.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -88,11 +88,11 @@ module Google
88
88
  endpoint: nil,
89
89
  project: nil,
90
90
  keyfile: nil
91
- project_id ||= (project || default_project_id)
91
+ project_id ||= project || default_project_id
92
92
  scope ||= configure.scope
93
93
  timeout ||= configure.timeout
94
94
  endpoint ||= configure.endpoint
95
- credentials ||= (keyfile || default_credentials(scope: scope))
95
+ credentials ||= keyfile || default_credentials(scope: scope)
96
96
 
97
97
  unless credentials.is_a? Google::Auth::Credentials
98
98
  credentials = Logging::Credentials.new credentials, scope: scope
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.3.2
4
+ version: 2.4.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: 2022-10-18 00:00:00.000000000 Z
12
+ date: 2024-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -67,174 +67,6 @@ dependencies:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.1'
70
- - !ruby/object:Gem::Dependency
71
- name: google-style
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: 1.26.1
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: 1.26.1
84
- - !ruby/object:Gem::Dependency
85
- name: minitest
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: '5.16'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: '5.16'
98
- - !ruby/object:Gem::Dependency
99
- name: minitest-autotest
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: '1.0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: '1.0'
112
- - !ruby/object:Gem::Dependency
113
- name: minitest-focus
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '1.1'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '1.1'
126
- - !ruby/object:Gem::Dependency
127
- name: minitest-rg
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '5.2'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - "~>"
138
- - !ruby/object:Gem::Version
139
- version: '5.2'
140
- - !ruby/object:Gem::Dependency
141
- name: autotest-suffix
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - "~>"
145
- - !ruby/object:Gem::Version
146
- version: '1.1'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - "~>"
152
- - !ruby/object:Gem::Version
153
- version: '1.1'
154
- - !ruby/object:Gem::Dependency
155
- name: redcarpet
156
- requirement: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - "~>"
159
- - !ruby/object:Gem::Version
160
- version: '3.0'
161
- type: :development
162
- prerelease: false
163
- version_requirements: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - "~>"
166
- - !ruby/object:Gem::Version
167
- version: '3.0'
168
- - !ruby/object:Gem::Dependency
169
- name: simplecov
170
- requirement: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - "~>"
173
- - !ruby/object:Gem::Version
174
- version: '0.9'
175
- type: :development
176
- prerelease: false
177
- version_requirements: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - "~>"
180
- - !ruby/object:Gem::Version
181
- version: '0.9'
182
- - !ruby/object:Gem::Dependency
183
- name: yard
184
- requirement: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - "~>"
187
- - !ruby/object:Gem::Version
188
- version: '0.9'
189
- type: :development
190
- prerelease: false
191
- version_requirements: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - "~>"
194
- - !ruby/object:Gem::Version
195
- version: '0.9'
196
- - !ruby/object:Gem::Dependency
197
- name: yard-doctest
198
- requirement: !ruby/object:Gem::Requirement
199
- requirements:
200
- - - "~>"
201
- - !ruby/object:Gem::Version
202
- version: 0.1.13
203
- type: :development
204
- prerelease: false
205
- version_requirements: !ruby/object:Gem::Requirement
206
- requirements:
207
- - - "~>"
208
- - !ruby/object:Gem::Version
209
- version: 0.1.13
210
- - !ruby/object:Gem::Dependency
211
- name: railties
212
- requirement: !ruby/object:Gem::Requirement
213
- requirements:
214
- - - "~>"
215
- - !ruby/object:Gem::Version
216
- version: '5.0'
217
- type: :development
218
- prerelease: false
219
- version_requirements: !ruby/object:Gem::Requirement
220
- requirements:
221
- - - "~>"
222
- - !ruby/object:Gem::Version
223
- version: '5.0'
224
- - !ruby/object:Gem::Dependency
225
- name: rack
226
- requirement: !ruby/object:Gem::Requirement
227
- requirements:
228
- - - ">="
229
- - !ruby/object:Gem::Version
230
- version: '0.1'
231
- type: :development
232
- prerelease: false
233
- version_requirements: !ruby/object:Gem::Requirement
234
- requirements:
235
- - - ">="
236
- - !ruby/object:Gem::Version
237
- version: '0.1'
238
70
  description: google-cloud-logging is the official library for Stackdriver Logging.
239
71
  email:
240
72
  - mike@blowmage.com
@@ -290,14 +122,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
122
  requirements:
291
123
  - - ">="
292
124
  - !ruby/object:Gem::Version
293
- version: '2.6'
125
+ version: '2.7'
294
126
  required_rubygems_version: !ruby/object:Gem::Requirement
295
127
  requirements:
296
128
  - - ">="
297
129
  - !ruby/object:Gem::Version
298
130
  version: '0'
299
131
  requirements: []
300
- rubygems_version: 3.3.14
132
+ rubygems_version: 3.5.6
301
133
  signing_key:
302
134
  specification_version: 4
303
135
  summary: API Client library for Stackdriver Logging