lorekeeper 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/lorekeeper/fast_logger.rb +4 -0
- data/lib/lorekeeper/json_logger.rb +5 -1
- data/lib/lorekeeper/simple_logger.rb +1 -1
- data/lib/lorekeeper/version.rb +1 -1
- 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: 1b323055eadcf9d776721dbf722fc84a3fa9c17d43fc2e1874d084eb4fab848a
|
4
|
+
data.tar.gz: 50329808d64339ccb223eeb8d9e44f3eeeccfbdf8e32bfb746d26db31d5f7123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08252a6d8b16fdf22554adb3b2c7b19b4d6c5d36fb154759004a178407b60a82affd2f4950b3b942955013d20464f8ec41d2222f75cc05349fd042e31a728ee5'
|
7
|
+
data.tar.gz: c46a95ddabda346971ecdda9039a1b98a0c816be963e5024cdac49461327f557d12d3842345979b54dff8771aca1f2e0b6e5b2046f91ce00d9a889f03f9d5408
|
data/CHANGELOG.md
CHANGED
@@ -94,6 +94,10 @@ module Lorekeeper
|
|
94
94
|
"Lorekeeper JSON logger. IO: #{@file.inspect}"
|
95
95
|
end
|
96
96
|
|
97
|
+
def write(message)
|
98
|
+
super(Oj.dump(message, mode: :compat, cache_keys: true, cache_str: 5) << "\n")
|
99
|
+
end
|
100
|
+
|
97
101
|
private
|
98
102
|
|
99
103
|
# Some instrumentation libraries pollute the stacktrace and create a large output which may
|
@@ -148,7 +152,7 @@ module Lorekeeper
|
|
148
152
|
fields_to_log[TIMESTAMP] = Time.now.utc.strftime(DATE_FORMAT)
|
149
153
|
fields_to_log[LEVEL] = SEVERITY_NAMES_MAP[severity]
|
150
154
|
|
151
|
-
|
155
|
+
write(fields_to_log)
|
152
156
|
end
|
153
157
|
end
|
154
158
|
end
|
@@ -28,7 +28,7 @@ module Lorekeeper
|
|
28
28
|
# \e[colorm sets a color \e[0m resets all properties
|
29
29
|
def log_data(severity, message)
|
30
30
|
color = SEVERITY_TO_COLOR_MAP[severity]
|
31
|
-
|
31
|
+
write("\e[#{color}m#{message.gsub('\n', "\n").gsub('\t', "\t")}\e[0m\n")
|
32
32
|
end
|
33
33
|
|
34
34
|
def inspect
|
data/lib/lorekeeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lorekeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordi Polo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|