lorekeeper 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -17
- data/Rakefile +0 -7
- data/lib/lorekeeper/fast_logger.rb +1 -1
- data/lib/lorekeeper/json_logger.rb +1 -13
- data/lib/lorekeeper/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c04d30160d6ec787f1842265407e9187cdbb707d
|
4
|
+
data.tar.gz: 56de4e4f9d1c4e19a558c5744d94cbff1a5f03da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2920b67cc06bd8f56fe1b1f3897f8169b3bc1bbe172cc6ecbde1ab5cf92460de0162dacda774f5c43b1d6d4b8248f1491893920da76a615106f8ae9ec51eab4e
|
7
|
+
data.tar.gz: de57889866ad7d8fb0d4eb084363127494b89ab7d7bf1d237cfd8cca73a9e88d39dd041c96223a08054384298c9e42d1564ea3125a9e7d1d89b7d055e35f8d0b
|
data/CHANGELOG.md
CHANGED
@@ -1,33 +1,35 @@
|
|
1
|
+
# 1.5.1
|
2
|
+
* Updating version to resolve issue with mistakenly created 1.5.0 gem version
|
3
|
+
|
1
4
|
# 1.5.0
|
2
|
-
|
3
|
-
|
5
|
+
* Mistakenly created version, please disregard
|
6
|
+
|
7
|
+
# 1.4.1
|
8
|
+
* Change array creation syntax to support Ruby 1.9
|
4
9
|
|
5
10
|
# 1.4.0
|
6
|
-
Adds '_with_data' to the simple logger so we can display data in the
|
7
|
-
|
8
|
-
Adds 'respond_to?' to the multilogger so users can check capabilities of
|
9
|
-
the loggers
|
11
|
+
* Adds '_with_data' to the simple logger so we can display data in the terminal
|
12
|
+
* Adds 'respond_to?' to the multilogger so users can check capabilities of the loggers
|
10
13
|
|
11
14
|
# 1.3.1
|
12
|
-
Loggers provide an inspect method to avoid being too noisy on outputs
|
15
|
+
* Loggers provide an inspect method to avoid being too noisy on outputs
|
13
16
|
|
14
17
|
# 1.3.0
|
15
|
-
Time in the JSON output specifies microseconds.
|
16
|
-
Using 'Z' to specify the UTC timezone instead of +0000 as per ISO 8601.
|
17
|
-
Debug and Info messages use the default foreground color of the terminal.
|
18
|
+
* Time in the JSON output specifies microseconds.
|
19
|
+
* Using 'Z' to specify the UTC timezone instead of +0000 as per ISO 8601.
|
20
|
+
* Debug and Info messages use the default foreground color of the terminal.
|
18
21
|
|
19
22
|
# 1.2.1
|
20
|
-
If a file does not exist, it will create it on behalf of the application
|
23
|
+
* If a file does not exist, it will create it on behalf of the application
|
21
24
|
|
22
25
|
# 1.2
|
23
|
-
Added a silence_logger method to the logger. For compatibility with
|
24
|
-
|
26
|
+
* Added a silence_logger method to the logger. For compatibility with activerecord-session and maybe other gems.
|
27
|
+
|
25
28
|
# 1.1.1
|
26
|
-
Avoid syntax errors in rubies < 2.3
|
29
|
+
* Avoid syntax errors in rubies < 2.3
|
27
30
|
|
28
31
|
# 1.1.0
|
29
|
-
Added an 'add' method to the logger so it is compatible with the Logger
|
30
|
-
provided by Ruby's standard library
|
32
|
+
* Added an 'add' method to the logger so it is compatible with the Logger provided by Ruby's standard library
|
31
33
|
|
32
34
|
# 1.0.0
|
33
|
-
Initial release
|
35
|
+
* Initial release
|
data/Rakefile
CHANGED
@@ -48,13 +48,6 @@ task :benchmark do
|
|
48
48
|
|
49
49
|
log = create_logger
|
50
50
|
simple_log = create_simple_logger
|
51
|
-
Benchmark.ips do |bm|
|
52
|
-
bm.report('short content') { Time.now }
|
53
|
-
bm.report('Logger short content') { Time.now.utc }
|
54
|
-
bm.report('long content') { Time.now.strftime('%FT%T.%6NZ') }
|
55
|
-
bm.report('Logger long content') { Time.now.utc.strftime('%FT%T.%6NZ') }
|
56
|
-
bm.compare!
|
57
|
-
end
|
58
51
|
|
59
52
|
Benchmark.ips do |bm|
|
60
53
|
bm.report('short content') { log.error(contents) }
|
@@ -21,7 +21,7 @@ module Lorekeeper
|
|
21
21
|
@file = file # We only keep this so we can inspect where we are sending the logs
|
22
22
|
end
|
23
23
|
|
24
|
-
LOGGING_METHODS =
|
24
|
+
LOGGING_METHODS = [:debug, :info, :warn, :error, :fatal]
|
25
25
|
METHOD_SEVERITY_MAP = { debug: DEBUG, info: INFO, warn: WARN, error: ERROR, fatal: FATAL }
|
26
26
|
|
27
27
|
# We define the behaviour of all the usual logging methods
|
@@ -152,19 +152,7 @@ module Lorekeeper
|
|
152
152
|
log_data(METHOD_SEVERITY_MAP[method_name], "#{message_param}, data: #{data}")
|
153
153
|
end
|
154
154
|
end
|
155
|
-
|
156
|
-
# TODO: move this to fast_logger so we DRY it
|
157
|
-
def exception(exception, custom_message = nil, custom_data = nil)
|
158
|
-
if exception.is_a?(Exception)
|
159
|
-
backtrace = exception.backtrace || []
|
160
|
-
message = custom_message || exception.message
|
161
|
-
error_with_data("#{exception.class}: #{message}", backtrace.join("\n"))
|
162
|
-
else
|
163
|
-
log_data(:warning, 'Logger exception called without exception class.')
|
164
|
-
error_with_data("#{exception.class}: #{exception.inspect} #{custom_message}", custom_data)
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
155
|
end
|
169
156
|
|
157
|
+
|
170
158
|
end
|
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: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordi Polo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -171,4 +171,3 @@ signing_key:
|
|
171
171
|
specification_version: 4
|
172
172
|
summary: Very fast JSON logger
|
173
173
|
test_files: []
|
174
|
-
has_rdoc:
|