gitlab-labkit 0.30.0 → 0.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/labkit/logging/json_logger.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3269b7b18f723ade60333e9e3d40216fde75dc5e1ab338d5970be043ee0b4146
|
4
|
+
data.tar.gz: 344f0595a78eaf3ae471fbc569d9abb43bb190de9423e351681ea5a0243f5bd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3921f2408e5c7c33f20b82ca43825f5818c4b843aba4ab5b0ac99cb3a361dafa9884c39c03c1706a2890a58ac8d39ddcff84e5bf9b417c8a5f70d03d2177762d
|
7
|
+
data.tar.gz: 016b1990785aab0f54e16cbf97335931467d308c9169057796da64272941f8dd0c082ff01022f655cb590a52888b4473f18a41c50451d0b8a9abf56dc6ce822e
|
@@ -6,8 +6,10 @@ require "json"
|
|
6
6
|
module Labkit
|
7
7
|
module Logging
|
8
8
|
class JsonLogger < ::Logger
|
9
|
-
|
10
|
-
|
9
|
+
# We should also reject log keys coming from Labkit::Context, but we cannot
|
10
|
+
# do this without breaking clients currently. This is tracked in
|
11
|
+
# https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby/-/issues/35
|
12
|
+
RESERVED_LOG_KEYS = [
|
11
13
|
:environment,
|
12
14
|
:host,
|
13
15
|
:shard,
|
@@ -29,7 +31,7 @@ module Labkit
|
|
29
31
|
data = default_attributes
|
30
32
|
data[:severity] = severity
|
31
33
|
data[:time] = timestamp.utc.iso8601(3)
|
32
|
-
data
|
34
|
+
data.merge!(Labkit::Context.current.to_h)
|
33
35
|
|
34
36
|
case message
|
35
37
|
when String
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-labkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Newdigate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|