ougai 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ougai/logger.rb +4 -4
- data/lib/ougai/version.rb +1 -1
- data/spec/logger_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c54bd7fa12af6d228cace05fc29a5b7d3505e29
|
4
|
+
data.tar.gz: ed95bd29269e64789b7d32d23cc28dea027ef8cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23bc030f29a729ee496228a21c9f42962b057801a9f7bc4cb857e73818a55eac9365ef326f40edb8c70b9907d44dc5570bd8e660e88f6df45414fe57bc22263c
|
7
|
+
data.tar.gz: a9ec8277f83d6c02ffcced038af1ceeaadd1564a6982bbf23bb6b37c0471a739e3b463c691a45c0fc07ce379062c7ebdc654621a29d6a37955b2721efb7562a6
|
data/Gemfile.lock
CHANGED
data/lib/ougai/logger.rb
CHANGED
@@ -91,14 +91,14 @@ module Ougai
|
|
91
91
|
def to_item(args)
|
92
92
|
msg, ex, data = args
|
93
93
|
|
94
|
-
if
|
94
|
+
if msg.nil?
|
95
|
+
{ msg: @default_message }
|
96
|
+
elsif ex.nil?
|
95
97
|
create_item_with_1arg(msg)
|
96
98
|
elsif data.nil?
|
97
99
|
create_item_with_2args(msg, ex)
|
98
|
-
|
100
|
+
else
|
99
101
|
create_item_with_3args(msg, ex, data)
|
100
|
-
else # No args
|
101
|
-
{ msg: @default_message }
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
data/lib/ougai/version.rb
CHANGED
data/spec/logger_spec.rb
CHANGED
@@ -230,6 +230,13 @@ describe Ougai::Logger do
|
|
230
230
|
expect(item).to include_data(something: { name: 'foo' })
|
231
231
|
end
|
232
232
|
end
|
233
|
+
|
234
|
+
context 'without arguments' do
|
235
|
+
it 'outputs only default message' do
|
236
|
+
logger.send(method)
|
237
|
+
expect(item).to be_log_message('No message', log_level)
|
238
|
+
end
|
239
|
+
end
|
233
240
|
end
|
234
241
|
|
235
242
|
describe '#trace' do
|