justlogging-rails 0.0.1 → 0.0.2

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.
@@ -7,11 +7,13 @@ module Justlogging
7
7
  app.middleware.insert_after ActionDispatch::DebugExceptions, Justlogging::Middleware
8
8
 
9
9
  Justlogging.subscriber = ActiveSupport::Notifications.subscribe do |*args|
10
- event = ActiveSupport::Notifications::Event.new(*args)
11
- if event.name == 'process_action.action_controller'
12
- Justlogging::Transaction.current.set_log_entry(event)
13
- else
14
- Justlogging::Transaction.current.add_event(event)
10
+ if Justlogging::Transaction.current
11
+ event = ActiveSupport::Notifications::Event.new(*args)
12
+ if event.name == 'process_action.action_controller'
13
+ Justlogging::Transaction.current.set_log_entry(event)
14
+ else
15
+ Justlogging::Transaction.current.add_event(event)
16
+ end
15
17
  end
16
18
  end
17
19
  end
@@ -1,3 +1,3 @@
1
1
  module Justlogging
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: justlogging-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: