justlogging-rails 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/justlogging/railtie.rb +7 -5
- data/lib/justlogging/version.rb +1 -1
- metadata +1 -1
data/lib/justlogging/railtie.rb
CHANGED
@@ -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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
data/lib/justlogging/version.rb
CHANGED