grape_logging 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grape_logging/middleware/request_logger.rb +4 -3
- data/lib/grape_logging/version.rb +1 -1
- 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: 953bc3996abee00a768fce8e8bb9e7b49bf0cf0e
|
4
|
+
data.tar.gz: 5b764486efdbf64f85abf50e46fe1f52b953f633
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da6f99aa5f53276170bf35d4ef6e4a7b43a445a668dbb8cf181980dbf5add07142c1ff7399157ab6465cdb45f57b0da11fa34013d77dbb99fc134f0670777eeb
|
7
|
+
data.tar.gz: 4071821e5f37e917eb4172481f73f4c9e3af133b05f04c931c898cdf380d277e56bbf073232cadbd0d88d8842ce63ebdfe55111362526bc42d8164d4edc236a2
|
@@ -7,7 +7,7 @@ module GrapeLogging
|
|
7
7
|
start_time
|
8
8
|
|
9
9
|
@db_duration = 0
|
10
|
-
ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
|
10
|
+
@subscription = ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
|
11
11
|
event = ActiveSupport::Notifications::Event.new(*args)
|
12
12
|
@db_duration += event.duration
|
13
13
|
end if defined?(ActiveRecord)
|
@@ -15,12 +15,13 @@ module GrapeLogging
|
|
15
15
|
|
16
16
|
def after
|
17
17
|
stop_time
|
18
|
-
logger.info parameters
|
18
|
+
logger.info parameters
|
19
|
+
ActiveSupport::Notifications.unsubscribe(@subscription) if @subscription
|
19
20
|
nil
|
20
21
|
end
|
21
22
|
|
22
23
|
protected
|
23
|
-
def parameters
|
24
|
+
def parameters
|
24
25
|
{
|
25
26
|
path: request.path,
|
26
27
|
params: request.params.to_hash,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aserafin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape
|