logjam_agent 0.1.2 → 0.1.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.
data/init.rb CHANGED
@@ -1 +1,3 @@
1
1
  ActionController::Dispatcher.middleware.insert_before(ActionController::Failsafe, LogjamAgent::Middleware)
2
+ LogjamAgent.application_name ||= "rails"
3
+ LogjamAgent.environment_name ||= Rails.env
data/lib/logjam_agent.rb CHANGED
@@ -13,7 +13,10 @@ module LogjamAgent
13
13
  self.error_handler = lambda { |exception| }
14
14
 
15
15
  mattr_accessor :application_name
16
- self.application_name = "rails"
16
+ self.application_name = nil
17
+
18
+ mattr_accessor :environment_name
19
+ self.environment_name = nil
17
20
 
18
21
  def self.disable!
19
22
  self.disabled = true
@@ -15,7 +15,9 @@ module LogjamAgent
15
15
  private
16
16
 
17
17
  def start_request(env)
18
- Rails.logger.start_request(env["logjam_agent.application_name"]||LogjamAgent.application_name, Rails.env)
18
+ app_name = env["logjam_agent.application_name"] || LogjamAgent.application_name
19
+ env_name = env["logjam_agent.environment_name"] || LogjamAgent.environment_name
20
+ Rails.logger.start_request(app_name, env_name)
19
21
  end
20
22
 
21
23
  def finish_request(env)
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefan Kaes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-05 00:00:00 +02:00
18
+ date: 2011-09-12 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency