lumberjack 2.0.3 → 2.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 140e49b15017aa81ca85a2e42a9de896b09938b5f9dd437a8f2917f821831d3d
4
- data.tar.gz: fe95870efcfb98d6831833e4125a74817f93c718969febcdba81e0b3b6e149a1
3
+ metadata.gz: 10256e5e180be0cdab14da8ac7d88d9ca8963a2b931487dd77708b5822477472
4
+ data.tar.gz: e9ee0ff426a4fb9ea297996a76c38a0cb84f2c4abbe463f0bd70740edd24eafb
5
5
  SHA512:
6
- metadata.gz: ba5adc8a3633df76fb78960ed06b266336c829d72ac48df5092dc5eb6fea4061ba4bb738c54aafbc2cedb23b6e638871992363120f0c323a916976e757d4bf0b
7
- data.tar.gz: e23288af3a076eead23bad85f885f4928d5aae4592cef341e6fd4f27ee9e65c6c8464e20c09b6d7a1522512ca70057027a9f40c0201bfa8b4400a6af139b4c3a
6
+ metadata.gz: be27defdbf78badf0d86859b1014af677700658c761b7921d815c13c8f590b6f2a9a69c6cb8903628e2b24d887075cdba93a884aafdd46ef4832d348426d070a
7
+ data.tar.gz: 989c98ef5ab72ba74cb569e48ad6b61442b5a244edd36357030842ca3de0118b719dfaf4c061ca7b96d082e89da8209d1f07c1e7673ca4d6decf69c899f47045
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 2.0.4
8
+
9
+ ### Fixed
10
+
11
+ - Hardened multi-threaded context locals handling to ensure compatibility with all Ruby implementations.
12
+
7
13
  ## 2.0.3
8
14
 
9
15
  ### Added
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.3
1
+ 2.0.4
@@ -49,11 +49,13 @@ module Lumberjack
49
49
 
50
50
  def set_context_locals(&block)
51
51
  scope_id = context_locals_scope_id
52
- current = @context_locals[scope_id] if scope_id
53
- data = Data.new(current)
52
+ current = nil
53
+ data = nil
54
54
 
55
55
  begin
56
56
  @context_locals_mutex.synchronize do
57
+ current = @context_locals[scope_id] if scope_id
58
+ data = Data.new(current)
57
59
  @context_locals[scope_id] = data
58
60
  end
59
61
  yield data
@@ -71,7 +73,10 @@ module Lumberjack
71
73
  def current_context_locals
72
74
  return nil unless defined?(@context_locals)
73
75
 
74
- @context_locals[context_locals_scope_id]
76
+ scope_id = context_locals_scope_id
77
+ @context_locals_mutex.synchronize do
78
+ @context_locals[scope_id]
79
+ end
75
80
  end
76
81
 
77
82
  # Initialize the context locals storage and mutex.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lumberjack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Durand
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 3.6.9
127
+ rubygems_version: 4.0.3
128
128
  specification_version: 4
129
129
  summary: Extension of Ruby’s standard Logger for advanced, structured logging. Includes
130
130
  log entry attributes, context isolation, customizable formatters, flexible output