logging-riemann 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logging/appenders/riemann.rb +1 -1
- data/lib/logging/riemann/version.rb +1 -1
- data/logging-riemann.gemspec +1 -1
- data/spec/lib/appenders/riemann_spec.rb +2 -2
- 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: 20b25d6787b87b4012e0114f081d442a88eb5ba6
|
4
|
+
data.tar.gz: 91bd5691c90aaccdde053c01f765e5c594fb954b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ff1d1b0973b1a50b7790a662d9de1417ede12cfc4db436016b9f90ee7dc6d58027604959c4aa790d3b5658bd204b1b0791b8c0be939fc0b660cf8730041fdcd
|
7
|
+
data.tar.gz: c4e86fb58c3df82ec6531d06aab30d43e5f8edeba22f5ffdf0b89b50e1f4b1e8016833218043ba8e17aa4ef4d68dda1708392a6957f9f3472aee922c1213df8e
|
@@ -40,7 +40,7 @@ module Logging
|
|
40
40
|
|
41
41
|
|
42
42
|
@mapper.call(riemann_event)
|
43
|
-
riemann_event[:
|
43
|
+
riemann_event[:state] ||= ::Logging::LNAMES[logging_event.level]
|
44
44
|
riemann_event[:host] ||= @host
|
45
45
|
riemann_event[:service] ||= @name
|
46
46
|
riemann_event[:description] ||= logging_event.data[:message]
|
data/logging-riemann.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "logging-riemann"
|
8
|
-
spec.version = "0.0.
|
8
|
+
spec.version = "0.0.2" #Logging::Riemann::VERSION
|
9
9
|
spec.authors = ["Peter Schrammel"]
|
10
10
|
spec.email = ["peter.schrammel@preisanalytics.de"]
|
11
11
|
spec.summary = %q{Logs to riemann}
|
@@ -33,7 +33,7 @@ RSpec.describe Logging::Appenders::Riemann do
|
|
33
33
|
it "creates a hash for event" do
|
34
34
|
hash=appender.event2riemann_hash(Logging::LogEvent.new("test",1,{:arg => "value"},false))
|
35
35
|
expect(hash).to eq(:arg=>"value",
|
36
|
-
:
|
36
|
+
:state=>"INFO",
|
37
37
|
:host=>"myhost",
|
38
38
|
:service=>"metric",
|
39
39
|
:description=>nil,
|
@@ -43,7 +43,7 @@ RSpec.describe Logging::Appenders::Riemann do
|
|
43
43
|
it "create a reimann event" do
|
44
44
|
expect(appender.riemann_client).to receive(:<<).
|
45
45
|
with({:description=>"wooha",
|
46
|
-
:
|
46
|
+
:state=>"INFO",
|
47
47
|
:host=>"myhost",
|
48
48
|
:service=>"metric",
|
49
49
|
:time=>@now.to_i})
|