lorekeeper 1.3.0 → 1.3.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 +3 -0
- data/lib/lorekeeper/fast_logger.rb +2 -1
- data/lib/lorekeeper/json_logger.rb +8 -0
- data/lib/lorekeeper/multi_logger.rb +4 -0
- data/lib/lorekeeper/version.rb +1 -1
- data/lorekeeper.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e883e332d3819a40caeecf907cdfad9d8ae3bfe9
|
4
|
+
data.tar.gz: 49b9d5aa078a5993dcbdeca154e085e2e9f0e6f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52e39e1aea389a5f13bfcb370c6832d8f57abc3dbabc4253ed157c5b03c9b97d58737440127098de1b7bb89099454e08c70357fb077a2c6d5d90e820a37e7f31
|
7
|
+
data.tar.gz: 491b6d0007bfdfaa8c105a98d99257cf78d9dc03140414b34272af2db13c8c3f7c3e70b4b099b25d83e4088e3597419d112fac24e927d4b22f519bc9c707b796
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,7 @@ module Lorekeeper
|
|
18
18
|
def initialize(file)
|
19
19
|
@level = DEBUG
|
20
20
|
@iodevice = LogDevice.new(file)
|
21
|
+
@file = file # We only keep this so we can inspect where we are sending the logs
|
21
22
|
end
|
22
23
|
|
23
24
|
LOGGING_METHODS = %i(debug info warn error fatal)
|
@@ -88,7 +89,7 @@ module Lorekeeper
|
|
88
89
|
|
89
90
|
def open_logfile(filename)
|
90
91
|
File.open(filename, (File::WRONLY | File::APPEND))
|
91
|
-
rescue Errno::ENOENT
|
92
|
+
rescue Errno::ENOENT
|
92
93
|
create_logfile(filename)
|
93
94
|
end
|
94
95
|
|
@@ -81,6 +81,10 @@ module Lorekeeper
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
def inspect
|
85
|
+
"Lorekeeper JSON logger. IO: #{@file.inspect}"
|
86
|
+
end
|
87
|
+
|
84
88
|
private
|
85
89
|
|
86
90
|
THREAD_KEY = 'lorekeeper_jsonlogger_key'.freeze # Shared by all threads but unique by thread
|
@@ -136,6 +140,10 @@ module Lorekeeper
|
|
136
140
|
color = SEVERITY_TO_COLOR_MAP[severity]
|
137
141
|
@iodevice.write("\e[#{color}m#{message}\e[0m\n")
|
138
142
|
end
|
143
|
+
|
144
|
+
def inspect
|
145
|
+
"Lorekeeper Simple logger. IO: #{@file.inspect}"
|
146
|
+
end
|
139
147
|
end
|
140
148
|
|
141
149
|
|
@@ -11,6 +11,10 @@ module Lorekeeper
|
|
11
11
|
@loggers << logger
|
12
12
|
end
|
13
13
|
|
14
|
+
def inspect
|
15
|
+
"Lorekeeper multilogger, loggers: #{@loggers.map(&:inspect)}"
|
16
|
+
end
|
17
|
+
|
14
18
|
def method_missing(method, *args, &block)
|
15
19
|
result = @loggers.map do |logger|
|
16
20
|
logger.public_send(method, *args, &block) if logger.respond_to?(method)
|
data/lib/lorekeeper/version.rb
CHANGED
data/lorekeeper.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
|
13
13
|
spec.summary = ' Very fast JSON logger '
|
14
14
|
spec.description = ' Opinionated logger which outputs messages in JSON format '
|
15
|
-
spec.homepage = 'http://www.
|
15
|
+
spec.homepage = 'http://www.github.com/jordipolo/lorekeeper'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
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.3.
|
4
|
+
version: 1.3.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-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -146,7 +146,7 @@ files:
|
|
146
146
|
- lib/lorekeeper/multi_logger.rb
|
147
147
|
- lib/lorekeeper/version.rb
|
148
148
|
- lorekeeper.gemspec
|
149
|
-
homepage: http://www.
|
149
|
+
homepage: http://www.github.com/jordipolo/lorekeeper
|
150
150
|
licenses:
|
151
151
|
- MIT
|
152
152
|
metadata: {}
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.4.8
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Very fast JSON logger
|