log15 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/log15/logger.rb +1 -1
- data/lib/log15/version.rb +1 -1
- data/spec/log15/logger_spec.rb +10 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc7bd26109546f67e0556515b429e95b0f65fe02
|
4
|
+
data.tar.gz: b8ead02627bebec876eb1c9bee8b141bd19b8843
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89864de477680aa98a3c2d63f973818f37f2e70e8c1510f68f0d16126662da3a7fd1246238d290d4eabc8cef97347820f922ef3272674943d098410d677e7a74
|
7
|
+
data.tar.gz: 76e7ac7077f10b7a0e7e2c2e1298fa1779f7826e0b37aa961203ab87c9c6d7b5cfb566b2d035a1ec3aa27e2d8824e22eaef597a55a6f5d4743819aa9d232c0b2
|
data/lib/log15/logger.rb
CHANGED
data/lib/log15/version.rb
CHANGED
data/spec/log15/logger_spec.rb
CHANGED
@@ -7,45 +7,45 @@ describe Log15 do
|
|
7
7
|
|
8
8
|
context "info" do
|
9
9
|
it "simple message" do
|
10
|
-
subject.info("
|
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("
|
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("
|
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("
|
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("
|
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.
|
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
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|