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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19d87c28c425031fb5819e07593210f5078ef857
4
- data.tar.gz: 4dce59c9d66c03394b471e72715dfbf131cb6720
3
+ metadata.gz: 9c54bd7fa12af6d228cace05fc29a5b7d3505e29
4
+ data.tar.gz: ed95bd29269e64789b7d32d23cc28dea027ef8cf
5
5
  SHA512:
6
- metadata.gz: aefa5448b0a64c2332ee30f7432fa6c941c929da5393a94ce664b0248723f1c4c7fb5a70e47c0e49864863b8cddba5ef1d5a41ae50032ec304db753fce831d85
7
- data.tar.gz: 603ec53229871b4ea8df521a35873a37842a96b3fd8bc7a3a8542a26a8737f5b10f21f22f44eea77bc45031bdcf7b5db74d6a2759d949ab870731f11155f5ab5
6
+ metadata.gz: 23bc030f29a729ee496228a21c9f42962b057801a9f7bc4cb857e73818a55eac9365ef326f40edb8c70b9907d44dc5570bd8e660e88f6df45414fe57bc22263c
7
+ data.tar.gz: a9ec8277f83d6c02ffcced038af1ceeaadd1564a6982bbf23bb6b37c0471a739e3b463c691a45c0fc07ce379062c7ebdc654621a29d6a37955b2721efb7562a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ougai (1.5.2)
4
+ ougai (1.5.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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 ex.nil?
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
- elsif msg
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
@@ -1,3 +1,3 @@
1
1
  module Ougai
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ougai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshimitsu Takahashi