logatron 0.6.0 → 0.7.0
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/Gemfile.lock +6 -5
- data/lib/logatron/logatron.rb +16 -1
- data/logatron.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3103d9cac1561ecd60127ba26110d18fb0fe720e
|
4
|
+
data.tar.gz: d35300ec7cdc5165ec570f56faf38fc38436bf25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fb22c5f504469d354b1dd7a0479ef89a45ecadd52d115c553fade502e33babb4b37c4a8eb507edae756fba59f5d0f89e4ecca17cd065e0ca998b3aca2e7b368
|
7
|
+
data.tar.gz: d3476f1bde8fd841211d40b37697fe5498733a2cb3132102c3c4e27b8f7bebd83501e0cf53ce86e58a285359005b0b4eb60881ba7d18d992dad088ab04de0f30
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
logatron (0.
|
4
|
+
logatron (0.6.0)
|
5
5
|
activesupport (>= 4.2.1, < 6.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (
|
11
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
10
|
+
activesupport (4.2.7.1)
|
12
11
|
i18n (~> 0.7)
|
12
|
+
json (~> 1.7, >= 1.7.7)
|
13
13
|
minitest (~> 5.1)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
14
15
|
tzinfo (~> 1.1)
|
15
16
|
builder (3.2.2)
|
16
|
-
concurrent-ruby (1.0.2)
|
17
17
|
diff-lcs (1.2.5)
|
18
18
|
i18n (0.7.0)
|
19
|
-
|
19
|
+
json (1.8.3)
|
20
|
+
minitest (5.9.1)
|
20
21
|
rake (10.4.2)
|
21
22
|
rspec (3.3.0)
|
22
23
|
rspec-core (~> 3.3.0)
|
data/lib/logatron/logatron.rb
CHANGED
@@ -50,12 +50,27 @@ module Logatron
|
|
50
50
|
logger.debug(msg)
|
51
51
|
end
|
52
52
|
|
53
|
+
# @deprecated Use operation_context for transportation-layer neutral data.
|
53
54
|
def http_headers
|
54
55
|
{
|
55
|
-
'X-Ascent-Log-Id' => msg_id
|
56
|
+
'X-Ascent-Log-Id' => msg_id,
|
57
|
+
'X-Ascent-Site' => site
|
56
58
|
}
|
57
59
|
end
|
58
60
|
|
61
|
+
def operation_context
|
62
|
+
{
|
63
|
+
message_id: msg_id,
|
64
|
+
site: site
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
def operation_context=(info)
|
69
|
+
return unless info.is_a? Hash
|
70
|
+
self.msg_id = info[:message_id] || info['message_id'] || self.msg_id
|
71
|
+
self.site = info[:site] || info['site'] || self.site
|
72
|
+
end
|
73
|
+
|
59
74
|
def log(id: msg_id, site: Logatron.site, msg: '-', severity: Logatron::INFO, request: '-', status: '-', source: '-', &block)
|
60
75
|
logger.log(id: id, site: site, msg: msg, severity: severity, request: request, status: status, source: source, &block)
|
61
76
|
end
|
data/logatron.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logatron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Grimes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|