logjam_agent 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logjam_agent/version.rb +1 -1
- data/lib/logjam_agent/zmq_forwarder.rb +4 -5
- 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: 85dbd1e17f5976041db6945c0b146d462a65bdb9
|
4
|
+
data.tar.gz: 7138bb521e856d3ea1ec8c3b95c393b02d5d5bf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cae11da795df8e5a3af5239a019db5a84fbbda5c61b2ce9bdd2e010eb10480148c5f91c072b6d80b87ed0bc3af3f4e751c7a679d2e474e348904c90d393964d
|
7
|
+
data.tar.gz: 747623a913bb64e627b710dafb0b893b1704ed941462ce7a68b56f9ac92798f32f47063a95c962f9a9b64b9851ef2f4b3df5e308a125d7337d74704e9a891210
|
data/lib/logjam_agent/version.rb
CHANGED
@@ -7,7 +7,7 @@ module LogjamAgent
|
|
7
7
|
@app = args[0] || LogjamAgent.application_name
|
8
8
|
@env = args[1] || LogjamAgent.environment_name
|
9
9
|
@config = default_options(@app, @env).merge!(opts)
|
10
|
-
@
|
10
|
+
@app_env = "#{@app}-#{@env}"
|
11
11
|
@zmq_hosts = Array(@config[:host])
|
12
12
|
@zmq_port = @config[:port]
|
13
13
|
end
|
@@ -15,7 +15,6 @@ module LogjamAgent
|
|
15
15
|
def default_options(app, env)
|
16
16
|
{
|
17
17
|
:host => "localhost",
|
18
|
-
:exchange => "request-stream-#{app}-#{env}",
|
19
18
|
:routing_key => "logs.#{app}.#{env}",
|
20
19
|
:port => 12345
|
21
20
|
}
|
@@ -65,14 +64,14 @@ module LogjamAgent
|
|
65
64
|
key += ".#{engine}"
|
66
65
|
end
|
67
66
|
publish(key, msg)
|
68
|
-
rescue
|
67
|
+
rescue => error
|
69
68
|
reraise_expectation_errors!
|
70
|
-
raise ForwardingError.new(
|
69
|
+
raise ForwardingError.new(error.message)
|
71
70
|
end
|
72
71
|
end
|
73
72
|
|
74
73
|
def publish(key, data)
|
75
|
-
parts = [@
|
74
|
+
parts = [@app_env, key, data]
|
76
75
|
if socket.send_strings(parts, ZMQ::DONTWAIT) < 0
|
77
76
|
raise "ZMQ error: #{ZMQ::Util.error_string}"
|
78
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|