service_skeleton 0.0.0.29.g23642ab → 0.0.0.30.g32b8169
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/service_skeleton/config.rb +13 -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: c73ba4e02f8bcd6f90caa188e15b3da3bd3fef747a30f8da70ac12881177c179
|
4
|
+
data.tar.gz: a1e1f008182f70f135c7455725d2e1bf4a7515789512786b2aa58c914bed9299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee7d4bb7bb7f1b84f37fb3d63bc698e632dcad00eaa98e886628106d3966d57ce950499696ea04628fb09f8e1de9b6242069486fc0669be2413278dcf6c8f744
|
7
|
+
data.tar.gz: 5d75bab29a82cd40083fde69a2d9725273475a45e922d68e2b3b88300215fc3ec0dfea08fa441556235fe48a0879fe5cbff037cf407debd9a3efd5f2710c18aa
|
@@ -62,10 +62,20 @@ class ServiceSkeleton
|
|
62
62
|
loggerstash.attach(@logger)
|
63
63
|
end
|
64
64
|
|
65
|
-
|
66
|
-
|
65
|
+
thread_id_map = {}
|
66
|
+
if Thread.main
|
67
|
+
thread_id_map[Thread.main.object_id] = 0
|
67
68
|
else
|
68
|
-
|
69
|
+
#:nocov:
|
70
|
+
thread_id_map[Thread.current.object_id] = 0
|
71
|
+
#:nocov:
|
72
|
+
end
|
73
|
+
|
74
|
+
@logger.formatter = ->(s, t, p, m) do
|
75
|
+
th_n = thread_id_map[Thread.current.object_id] || (thread_id_map[Thread.current.object_id] = thread_id_map.length)
|
76
|
+
|
77
|
+
ts = log_enable_timestamps ? "#{t.utc.strftime("%FT%T.%NZ")} " : ""
|
78
|
+
"#{ts}##{th_n} #{s[0]} [#{p}] #{m}\n"
|
69
79
|
end
|
70
80
|
|
71
81
|
@logger.filters = []
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_skeleton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.30.g32b8169
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: frankenstein
|