zlog 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/zlog/cli.rb +2 -1
- data/lib/zlog/zlog.rb +2 -4
- data/test/classes/zlog_spec.rb +4 -6
- 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: 8221af279519fb20d8f5a8c60646313a32dc0465
|
4
|
+
data.tar.gz: 3214baf78eaed6044728ff4425757f31369cafd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 987a8dfc97ddb2846df805c247de4dbe2225570e6d34058e7386d456605656dc1b5aa370a9de8e24a94b243fd96843faf4dbfd57207d881c1420f8eda191f840
|
7
|
+
data.tar.gz: 69283e632c9b1f4fce4808f8ab4a170c2bd42bfc39c0666b06b8bb2ee31c1b1d1d3bc80816bbeb4d18fab43eec19ddf8fa0efbd21b3cea20b07d59c7eaef897d
|
data/CHANGELOG.md
CHANGED
data/lib/zlog/cli.rb
CHANGED
data/lib/zlog/zlog.rb
CHANGED
@@ -2,7 +2,7 @@ require 'json'
|
|
2
2
|
require 'tmpdir'
|
3
3
|
|
4
4
|
module Zlog
|
5
|
-
VERSION = "0.9.
|
5
|
+
VERSION = "0.9.2"
|
6
6
|
extend self
|
7
7
|
|
8
8
|
def init_stdout opts = {layout: :simple, loglevel: nil}
|
@@ -60,9 +60,7 @@ module Zlog
|
|
60
60
|
# json example:
|
61
61
|
# {"timestamp":"2013-10-10T18:37:38.513438+02:00","level":"DEBUG",
|
62
62
|
# "logger":"Log1-debug","message":"debugging info, this won't show up on console"}
|
63
|
-
|
64
|
-
Logging::LogEvent.new( j['logger'], Logging.level_num(j['level']), msg, j['timestamp'] )
|
65
|
-
end
|
63
|
+
Logging::LogEvent.new( j['logger'], Logging.level_num(j['level']), j['message'].to_s, j['timestamp'] )
|
66
64
|
rescue
|
67
65
|
nil
|
68
66
|
end
|
data/test/classes/zlog_spec.rb
CHANGED
@@ -51,12 +51,10 @@ describe Zlog do
|
|
51
51
|
it "must convert a logging json to a logevent" do
|
52
52
|
@examples.each do |e|
|
53
53
|
r = Zlog.json_2_event e[:raw]
|
54
|
-
r.must_be_instance_of
|
55
|
-
|
56
|
-
r[
|
57
|
-
r
|
58
|
-
r[0].logger.must_equal "Mocker#{e[:name]}"
|
59
|
-
r[0].data.must_equal "mock message #{e[:name]}"
|
54
|
+
r.must_be_instance_of Logging::LogEvent
|
55
|
+
r.level.must_equal e[:level]
|
56
|
+
r.logger.must_equal "Mocker#{e[:name]}"
|
57
|
+
r.data.must_equal "mock message #{e[:name]}"
|
60
58
|
end
|
61
59
|
end
|
62
60
|
|