log15 1.0.1 → 1.0.2

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: 7de74d10fe1cb2c7d90715ecb0b3c65de29a02bf
4
- data.tar.gz: 3f2f25cefc4bf686bef33c5ed67450e26af4e569
3
+ metadata.gz: 1c678e40327d2e4a48c7b3b259f60c8af680105d
4
+ data.tar.gz: 6d391a71dbc92e58144ebeeec9b666270b165ff1
5
5
  SHA512:
6
- metadata.gz: 33a1bb69aaaefb17956bbdb3f24a153186d5eede6d85cc698c4c0452366915b6289713143d3b51d9d64c248bea82458a1916db932b89d37c84187bf8c6ae256e
7
- data.tar.gz: 901bacdadc334a213044bdcc713e3b3b850cb06d797099ab149f0fdabb53023834dcf1623d38fe1e5817c70ed25f4028e17fcfce268eb83a228d92dfb05fa7ab
6
+ metadata.gz: e011e4081d11de9f681182216709da1602dd4faaec30fa09649509b76f556314ea86d7975520bc3b40cf3ae080ff201eb3b666a4d6f16921de368e47bbd3217d
7
+ data.tar.gz: 6efa3aeacd6025948cc5eebcdbf40a3c8dc5e323c21d9425c2cd2743942530588b5684aae86029a52248af44e00b10af491cfcbee4c67fec4cd8cb73ffadb405
@@ -10,8 +10,9 @@ module Log15
10
10
  date = "#{datetime.month}-#{datetime.day}"
11
11
  time = "#{pad(datetime.hour)}:#{pad(datetime.min)}:#{pad(datetime.sec)}"
12
12
  severities = { "ERROR" => "EROR", "DEBUG" => "DBUG" }
13
+ original_severity = severity
13
14
  severity = severities.fetch(severity, severity)
14
- "#{severity}[#{date}|#{time}] #{msg}\n"
15
+ "#{severity}[#{date}|#{time}] #{msg} lvl=#{original_severity.downcase}\n"
15
16
  end
16
17
  end
17
18
 
@@ -1,3 +1,3 @@
1
1
  module Log15
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -11,7 +11,7 @@ describe Log15 do
11
11
  output = log.string
12
12
  expect(output).to match(/^INFO/)
13
13
  expect(output).to match(/\[\d{2}-\d{2}|\d{2}:\d{2}:\d{2}\]/)
14
- expect(output).to match(/msg foo="bar" baz="foo"\n$/)
14
+ expect(output).to match(/msg foo="bar" baz="foo" lvl=info\n$/)
15
15
  end
16
16
 
17
17
  it "message with quotes" do
@@ -19,7 +19,7 @@ describe Log15 do
19
19
  output = log.string
20
20
  expect(output).to match(/^INFO/)
21
21
  expect(output).to match(/\[\d{2}-\d{2}|\d{2}:\d{2}:\d{2}\]/)
22
- expect(output).to match(/msg foo="\\\"bar\\\""\n$/)
22
+ expect(output).to match(/msg foo="\\\"bar\\\"" lvl=info\n$/)
23
23
  end
24
24
 
25
25
  it "message with nested hash" do
@@ -27,7 +27,7 @@ describe Log15 do
27
27
  output = log.string
28
28
  expect(output).to match(/^INFO/)
29
29
  expect(output).to match(/\[\d{2}-\d{2}|\d{2}:\d{2}:\d{2}\]/)
30
- expect(output).to match(/msg foo="{\\\"bar\\\":\\\"baz\\\"}"\n$/)
30
+ expect(output).to match(/msg foo="{\\\"bar\\\":\\\"baz\\\"}" lvl=info\n$/)
31
31
  end
32
32
 
33
33
  it "message with nested array" do
@@ -35,7 +35,7 @@ describe Log15 do
35
35
  output = log.string
36
36
  expect(output).to match(/^INFO/)
37
37
  expect(output).to match(/\[\d{2}-\d{2}|\d{2}:\d{2}:\d{2}\]/)
38
- expect(output).to match(/msg foo="\[\\\"bar\\\",\\\"baz\\\"\]"\n$/)
38
+ expect(output).to match(/msg foo="\[\\\"bar\\\",\\\"baz\\\"\]" lvl=info\n$/)
39
39
  end
40
40
  end
41
41
 
@@ -45,7 +45,7 @@ describe Log15 do
45
45
  output = log.string
46
46
  expect(output).to match(/^DBUG/)
47
47
  expect(output).to match(/\[\d{2}-\d{2}|\d{2}:\d{2}:\d{2}\]/)
48
- expect(output).to match(/msg foo="bar"\n$/)
48
+ expect(output).to match(/msg foo="bar" lvl=debug\n$/)
49
49
  end
50
50
  end
51
51
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log15
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-26 00:00:00.000000000 Z
11
+ date: 2014-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json