govuk_app_config 9.0.3 → 9.0.4

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: 2e87fe7b5d3d3c22c7bce9dd0b18ddc1d949741eadb620832752723d7b36dc7c
4
- data.tar.gz: '06510976f0ad19f829f5fb5bfb9ad178d48f66eb1ca063f3cad6efffade10a7e'
3
+ metadata.gz: 13c7b2080a8136a1799208e1bf685d420afbde632c35780c7b2cef063d7bad54
4
+ data.tar.gz: 757a148a0d5db0867f8ca54033cb243837c5dadb9427c5047c24db4bcc96a897
5
5
  SHA512:
6
- metadata.gz: 11b27df9aa24a5a0751a75150b4227e7acfd542168766c40ffbbce505502e00db02a9820eb22309b0296a822e6a571f28704d0ac9ede717ddb5640ce89151c4a
7
- data.tar.gz: 7321f213d4b9d0356404a03bedd949596c5e8f9e59d1b0f80cc10e1e1e120db162385c6df3d1afa073b24075102f1e84d9a9a66ad37adb743ae54302f3ce1a0f
6
+ metadata.gz: 7838253f4088c269f00f85ae005ee072ae3e08a935ba49f39e1dd0aa9b5c857de75472ebb73697b9ad49c31c61a62ad47556a3b75fe660edd2d818b0ad00cd65
7
+ data.tar.gz: 102c41532cfa9d12140d54c5ed44b8bc06eb0e331524d032652c4f8b9d68fb5b1adcfb1044e197135ed4c7b9161903219719f767327719a09ed862a1de9dbca7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 9.0.4
2
+
3
+ * Fix an issue with Rails.logger being not an instance of ActiveSupport::Logger. Rails expects Rails.logger to have methods that Ruby STD Logger does not provide. e.g. `silence()` ([#309](https://github.com/alphagov/govuk_app_config/pull/309))
4
+
1
5
  # 9.0.3
2
6
 
3
7
  * When error is reported by Rails logger, the field is now logged as "error_message" in order to avoid overwriting the "message" field.
@@ -8,24 +8,21 @@ module GovukJsonLogging
8
8
  # indefinitely while troubleshooting.
9
9
  $stdout.sync = true
10
10
 
11
- Rails.logger = Logger.new(
12
- $stdout,
13
- level: Rails.logger.level,
14
- formatter: proc { |severity, datetime, _progname, msg|
15
- hash = {
16
- "@timestamp": datetime.utc.iso8601(3),
17
- message: msg,
18
- level: severity,
19
- tags: %w[rails],
20
- }
11
+ Rails.logger = ActiveSupport::Logger.new($stdout, level: Rails.logger.level)
12
+ Rails.logger.formatter = proc { |severity, datetime, _progname, msg|
13
+ hash = {
14
+ "@timestamp": datetime.utc.iso8601(3),
15
+ message: msg,
16
+ level: severity,
17
+ tags: %w[rails],
18
+ }
21
19
 
22
- if defined?(GdsApi::GovukHeaders) && !GdsApi::GovukHeaders.headers[:govuk_request_id].nil?
23
- hash[:govuk_request_id] = GdsApi::GovukHeaders.headers[:govuk_request_id]
24
- end
20
+ if defined?(GdsApi::GovukHeaders) && !GdsApi::GovukHeaders.headers[:govuk_request_id].nil?
21
+ hash[:govuk_request_id] = GdsApi::GovukHeaders.headers[:govuk_request_id]
22
+ end
25
23
 
26
- "#{hash.to_json}\n"
27
- },
28
- )
24
+ "#{hash.to_json}\n"
25
+ }
29
26
 
30
27
  LogStasher.add_custom_fields do |fields|
31
28
  # Mirrors Nginx request logging, e.g. GET /path/here HTTP/1.1
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "9.0.3".freeze
2
+ VERSION = "9.0.4".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_app_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.3
4
+ version: 9.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-14 00:00:00.000000000 Z
11
+ date: 2023-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstasher
@@ -363,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
363
  - !ruby/object:Gem::Version
364
364
  version: '0'
365
365
  requirements: []
366
- rubygems_version: 3.4.16
366
+ rubygems_version: 3.4.17
367
367
  signing_key:
368
368
  specification_version: 4
369
369
  summary: Base configuration for GOV.UK applications