log15 1.0.2 → 1.0.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: 1c678e40327d2e4a48c7b3b259f60c8af680105d
4
- data.tar.gz: 6d391a71dbc92e58144ebeeec9b666270b165ff1
3
+ metadata.gz: dc7bd26109546f67e0556515b429e95b0f65fe02
4
+ data.tar.gz: b8ead02627bebec876eb1c9bee8b141bd19b8843
5
5
  SHA512:
6
- metadata.gz: e011e4081d11de9f681182216709da1602dd4faaec30fa09649509b76f556314ea86d7975520bc3b40cf3ae080ff201eb3b666a4d6f16921de368e47bbd3217d
7
- data.tar.gz: 6efa3aeacd6025948cc5eebcdbf40a3c8dc5e323c21d9425c2cd2743942530588b5684aae86029a52248af44e00b10af491cfcbee4c67fec4cd8cb73ffadb405
6
+ metadata.gz: 89864de477680aa98a3c2d63f973818f37f2e70e8c1510f68f0d16126662da3a7fd1246238d290d4eabc8cef97347820f922ef3272674943d098410d677e7a74
7
+ data.tar.gz: 76e7ac7077f10b7a0e7e2c2e1298fa1779f7826e0b37aa961203ab87c9c6d7b5cfb566b2d035a1ec3aa27e2d8824e22eaef597a55a6f5d4743819aa9d232c0b2
@@ -57,7 +57,7 @@ module Log15
57
57
  private
58
58
 
59
59
  def process(msg, data)
60
- output = ["#{msg}"]
60
+ output = ["msg=#{msg.inspect}"]
61
61
  if data.keys.count > 0
62
62
  data.each do |k, v|
63
63
  if v.is_a?(Array) || v.is_a?(Hash)
@@ -1,3 +1,3 @@
1
1
  module Log15
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -7,45 +7,45 @@ describe Log15 do
7
7
 
8
8
  context "info" do
9
9
  it "simple message" do
10
- subject.info("msg", foo: "bar", baz: "foo")
10
+ subject.info("message goes here", foo: "bar", baz: "foo")
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" lvl=info\n$/)
14
+ expect(output).to match(/msg="message goes here" foo="bar" baz="foo" lvl=info\n$/)
15
15
  end
16
16
 
17
17
  it "message with quotes" do
18
- subject.info("msg", foo: "\"bar\"")
18
+ subject.info("message goes here", foo: "\"bar\"")
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\\\"" lvl=info\n$/)
22
+ expect(output).to match(/msg="message goes here" foo="\\\"bar\\\"" lvl=info\n$/)
23
23
  end
24
24
 
25
25
  it "message with nested hash" do
26
- subject.info("msg", foo: { bar: "baz"})
26
+ subject.info("message goes here", foo: { bar: "baz"})
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\\\"}" lvl=info\n$/)
30
+ expect(output).to match(/msg="message goes here" foo="{\\\"bar\\\":\\\"baz\\\"}" lvl=info\n$/)
31
31
  end
32
32
 
33
33
  it "message with nested array" do
34
- subject.info("msg", foo: ["bar", "baz"])
34
+ subject.info("message goes here", foo: ["bar", "baz"])
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\\\"\]" lvl=info\n$/)
38
+ expect(output).to match(/msg="message goes here" foo="\[\\\"bar\\\",\\\"baz\\\"\]" lvl=info\n$/)
39
39
  end
40
40
  end
41
41
 
42
42
  context "debug" do
43
43
  it "simple message" do
44
- subject.debug("msg", foo: "bar")
44
+ subject.debug("message goes here", foo: "bar")
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" lvl=debug\n$/)
48
+ expect(output).to match(/msg="message goes here" 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.2
4
+ version: 1.0.3
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-12-11 00:00:00.000000000 Z
11
+ date: 2014-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json