contextual_logger 1.2.0.colin.5 → 1.2.0.colin.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e69ef52ab71f4f66d8f0d933f9ac6e74b5f2d8c218cd7b5865086f1ae00a6ff
|
4
|
+
data.tar.gz: e7245b4c4074d6f112730ed3b89b681b21a12042b96d03e751329f1a8f302363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ced2de731f75eef24afa7d327c0947299202a92f904df2a424af43c3520de8cfdcc8b21d1967a198f17cb6510fe3406449e969077f9bcb0b8b173dfe94d6a52
|
7
|
+
data.tar.gz: 36e6d8e0e7c44e9444bd8907700b3072aa4f8f3767c2b7937dc5d59a747acfeb33c1943a8a4ed65a68ba5851ca16c5164daf948d2390b6bec19472721cefb21c
|
@@ -10,11 +10,11 @@ module ContextualLogger
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def current_context_override
|
13
|
-
ContextualLogger.global_context_lock_message ||= "ContextualLogger::Context.current_context_override set for #{self.class.name} #{object_id}"
|
14
13
|
Thread.current[thread_context_key_for_logger_instance]
|
15
14
|
end
|
16
15
|
|
17
16
|
def current_context_override=(context_override)
|
17
|
+
ContextualLogger.global_context_lock_message ||= "ContextualLogger::Context.current_context_override set for #{self.class.name} #{object_id}: #{context_override.inspect}"
|
18
18
|
Thread.current[thread_context_key_for_logger_instance] = context_override.freeze
|
19
19
|
end
|
20
20
|
end
|
data/lib/contextual_logger.rb
CHANGED
@@ -72,7 +72,7 @@ module ContextualLogger
|
|
72
72
|
alias current_context_for_thread current_context
|
73
73
|
|
74
74
|
def with_context(stacked_context)
|
75
|
-
context_handler = ContextHandler.new(self,
|
75
|
+
context_handler = ContextHandler.new(self, current_context_override)
|
76
76
|
self.current_context_override = deep_merge_with_current_context(stacked_context)
|
77
77
|
|
78
78
|
if block_given?
|