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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/govuk_app_config/govuk_json_logging.rb +13 -16
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13c7b2080a8136a1799208e1bf685d420afbde632c35780c7b2cef063d7bad54
|
4
|
+
data.tar.gz: 757a148a0d5db0867f8ca54033cb243837c5dadb9427c5047c24db4bcc96a897
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
23
|
-
|
24
|
-
|
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
|
-
|
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
|
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.
|
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-
|
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.
|
366
|
+
rubygems_version: 3.4.17
|
367
367
|
signing_key:
|
368
368
|
specification_version: 4
|
369
369
|
summary: Base configuration for GOV.UK applications
|