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 +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/lumberjack/context_locals.rb +8 -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: 10256e5e180be0cdab14da8ac7d88d9ca8963a2b931487dd77708b5822477472
|
|
4
|
+
data.tar.gz: e9ee0ff426a4fb9ea297996a76c38a0cb84f2c4abbe463f0bd70740edd24eafb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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 =
|
|
53
|
-
data =
|
|
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
|
-
|
|
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.
|
|
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:
|
|
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
|