ougai 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +22 -20
- data/README.md +3 -0
- data/lib/ougai/child_logger.rb +1 -0
- data/lib/ougai/logger.rb +1 -0
- data/lib/ougai/version.rb +1 -1
- data/spec/formatters/readable_spec.rb +1 -1
- data/spec/logger_spec.rb +8 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 768eb635909df00d19e850afcace9619451010b2ba622e2501babcbc0b03f20e
|
4
|
+
data.tar.gz: 0b89ea852a6dd204db6585a77a68bbc5fc9e36a8f3cc23c0b8c0f38c992894c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81e360fdffe1d371268dd0655ac07eb3d3c28c4acfe2042c13195391d70ff3f82871aea3a72633d9d7cf42749042ef677a1e75e9fe4c28dddbe47617db25a92f
|
7
|
+
data.tar.gz: e4110bd34b6da5dae6e56b7a5f28eefdc4bb2e2295b0090b3b958e9a43abf5136409e4312a2c71510380459d57ed88aa6128b9a22857bafc215b94ca182cb7f1
|
data/Gemfile.lock
CHANGED
@@ -1,40 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ougai (1.7.
|
4
|
+
ougai (1.7.1)
|
5
5
|
oj (~> 3.4)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
awesome_print (1.8.0)
|
11
|
-
diff-lcs (1.
|
12
|
-
docile (1.1
|
11
|
+
diff-lcs (1.3)
|
12
|
+
docile (1.3.1)
|
13
13
|
json (2.1.0)
|
14
|
-
|
14
|
+
json (2.1.0-java)
|
15
|
+
oj (3.7.4)
|
15
16
|
rake (10.5.0)
|
16
|
-
rspec (3.
|
17
|
-
rspec-core (~> 3.
|
18
|
-
rspec-expectations (~> 3.
|
19
|
-
rspec-mocks (~> 3.
|
20
|
-
rspec-core (3.
|
21
|
-
rspec-support (~> 3.
|
22
|
-
rspec-expectations (3.
|
17
|
+
rspec (3.8.0)
|
18
|
+
rspec-core (~> 3.8.0)
|
19
|
+
rspec-expectations (~> 3.8.0)
|
20
|
+
rspec-mocks (~> 3.8.0)
|
21
|
+
rspec-core (3.8.0)
|
22
|
+
rspec-support (~> 3.8.0)
|
23
|
+
rspec-expectations (3.8.2)
|
23
24
|
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
-
rspec-support (~> 3.
|
25
|
-
rspec-mocks (3.
|
25
|
+
rspec-support (~> 3.8.0)
|
26
|
+
rspec-mocks (3.8.0)
|
26
27
|
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
-
rspec-support (~> 3.
|
28
|
-
rspec-support (3.
|
29
|
-
simplecov (0.
|
30
|
-
docile (~> 1.1
|
28
|
+
rspec-support (~> 3.8.0)
|
29
|
+
rspec-support (3.8.0)
|
30
|
+
simplecov (0.16.1)
|
31
|
+
docile (~> 1.1)
|
31
32
|
json (>= 1.8, < 3)
|
32
33
|
simplecov-html (~> 0.10.0)
|
33
|
-
simplecov-html (0.10.
|
34
|
+
simplecov-html (0.10.2)
|
34
35
|
timecop (0.9.1)
|
35
|
-
yard (0.9.
|
36
|
+
yard (0.9.16)
|
36
37
|
|
37
38
|
PLATFORMS
|
39
|
+
java
|
38
40
|
ruby
|
39
41
|
|
40
42
|
DEPENDENCIES
|
@@ -48,4 +50,4 @@ DEPENDENCIES
|
|
48
50
|
yard
|
49
51
|
|
50
52
|
BUNDLED WITH
|
51
|
-
1.16.
|
53
|
+
1.16.2
|
data/README.md
CHANGED
@@ -355,6 +355,9 @@ logger.formatter = Ougai::Formatters::Readable.new
|
|
355
355
|
- [Forward logs to Loggly](https://github.com/tilfin/ougai/wiki/Forward-logs-to-Loggly)
|
356
356
|
- [Use as Rack logger](https://github.com/tilfin/ougai/wiki/Use-as-Rack-logger)
|
357
357
|
|
358
|
+
## Custom formatters and integrations
|
359
|
+
- [Awesome Ougai](https://github.com/tilfin/ougai/wiki/Awesom-Ougai)
|
360
|
+
|
358
361
|
## License
|
359
362
|
|
360
363
|
[MIT](LICENSE.txt)
|
data/lib/ougai/child_logger.rb
CHANGED
data/lib/ougai/logger.rb
CHANGED
data/lib/ougai/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Ougai::Formatters::Readable do
|
4
|
-
let!(:re_start_with_datetime) { /^\[\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}(Z|[\+\-\:0-9]{4,6})]/ }
|
4
|
+
let!(:re_start_with_datetime) { /^\[\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}(Z|[\+\-\:0-9]{4,6})\]/ }
|
5
5
|
|
6
6
|
let(:data) do
|
7
7
|
{
|
data/spec/logger_spec.rb
CHANGED
@@ -40,11 +40,17 @@ describe Ougai::Logger do
|
|
40
40
|
log_str = io.string
|
41
41
|
begin
|
42
42
|
JSON.parse(log_str, symbolize_names: true)
|
43
|
-
rescue Exception
|
43
|
+
rescue Exception
|
44
44
|
nil
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
class Dummy
|
49
|
+
def to_hash
|
50
|
+
{ foo: 1 }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
48
54
|
shared_examples 'log' do
|
49
55
|
context 'with message' do
|
50
56
|
it 'outputs valid' do
|
@@ -130,12 +136,6 @@ describe Ougai::Logger do
|
|
130
136
|
|
131
137
|
context 'with data that can respond to_hash' do
|
132
138
|
it 'outputs valid' do
|
133
|
-
class Dummy
|
134
|
-
def to_hash
|
135
|
-
{ foo: 1 }
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
139
|
logger.send(method, Dummy.new)
|
140
140
|
expect(item).to be_log_message('No message', log_level)
|
141
141
|
expect(item).to include_data(foo: 1)
|
@@ -586,7 +586,7 @@ describe Ougai::Logger do
|
|
586
586
|
log_str = another_io.string
|
587
587
|
begin
|
588
588
|
JSON.parse(log_str, symbolize_names: true)
|
589
|
-
rescue Exception
|
589
|
+
rescue Exception
|
590
590
|
nil
|
591
591
|
end
|
592
592
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ougai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshimitsu Takahashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.7.
|
125
|
+
rubygems_version: 2.7.6
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: JSON logger compatible with node-bunyan or pino is capable of handling structured
|