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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c27996c0dc000a98a9ca5297b79fce959c3acd01
4
- data.tar.gz: b2c41b261e7c8bb2b030f16727925a6106663509
3
+ metadata.gz: 85dbd1e17f5976041db6945c0b146d462a65bdb9
4
+ data.tar.gz: 7138bb521e856d3ea1ec8c3b95c393b02d5d5bf0
5
5
  SHA512:
6
- metadata.gz: d8d4cff43f66c427a1f410905fea537f0ee9ec11135ba2dd4420ec02c1126bdaa10dac320fb85974363bce2aff380686d6230bd53b8070b6719ebb398ba3da5b
7
- data.tar.gz: 864d5f235fca16aa884f0e52ce06be74ed77a3a12a3042a155d6ec4671a812ec145dc4d109572aaeec182b17f4b387b099aba6d96ed105616581009bcc1602f7
6
+ metadata.gz: 6cae11da795df8e5a3af5239a019db5a84fbbda5c61b2ce9bdd2e010eb10480148c5f91c072b6d80b87ed0bc3af3f4e751c7a679d2e474e348904c90d393964d
7
+ data.tar.gz: 747623a913bb64e627b710dafb0b893b1704ed941462ce7a68b56f9ac92798f32f47063a95c962f9a9b64b9851ef2f4b3df5e308a125d7337d74704e9a891210
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.10.1"
2
+ VERSION = "0.10.2"
3
3
  end
@@ -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
- @exchange = @config[:exchange]
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 Exception => exception
67
+ rescue => error
69
68
  reraise_expectation_errors!
70
- raise ForwardingError.new(exception.message)
69
+ raise ForwardingError.new(error.message)
71
70
  end
72
71
  end
73
72
 
74
73
  def publish(key, data)
75
- parts = [@exchange, key, data]
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.1
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-08-27 00:00:00.000000000 Z
11
+ date: 2014-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake