rack-action_logger 0.1.4 → 0.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c8a0cd101f204c4b4e28255d03d14e870cba315
|
4
|
+
data.tar.gz: e0f07f6e7cea35b0ec48eb914df791a8676ed3e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 552f8b621a8668c9b39526f74839045f2671dd6ab9891e2bc6bdb063067093392258bfe03ffc5784f5a9052be45c8986ee89d15717d2aa483ea6bba8076ca1db
|
7
|
+
data.tar.gz: 34f8be1a577fda8469a585e07fbf8b482f6abefadc1a21c14a602b70e7fd04214658b8705467d33e86135129bad699b07ddbccbb2bf484f1808da00bd9f2a033
|
data/Gemfile.lock
CHANGED
@@ -16,6 +16,7 @@ module Rack::ActionLogger
|
|
16
16
|
attr_accessor :pretty_print
|
17
17
|
attr_accessor :rack_metrics
|
18
18
|
attr_accessor :rack_content_types
|
19
|
+
attr_accessor :rack_unified_tag
|
19
20
|
|
20
21
|
def initialize
|
21
22
|
@emit_adapter = EmitAdapter::LoggerAdapter
|
@@ -27,6 +28,7 @@ module Rack::ActionLogger
|
|
27
28
|
@pretty_print = true
|
28
29
|
@rack_metrics = Rack::ActionLogger::Metrics::RackMetrics
|
29
30
|
@rack_content_types = %w(text/html application/json)
|
31
|
+
@rack_unified_tag = true
|
30
32
|
end
|
31
33
|
|
32
34
|
def tag_prefix
|
@@ -26,6 +26,7 @@ module Rack::ActionLogger::Metrics
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def tag_suffix
|
29
|
+
return RACK_TAG_PREFIX if Rack::ActionLogger.configuration.rack_unified_tag
|
29
30
|
if @status_code == 404
|
30
31
|
tags = ['not_found']
|
31
32
|
else
|
@@ -60,7 +61,7 @@ module Rack::ActionLogger::Metrics
|
|
60
61
|
end
|
61
62
|
|
62
63
|
def enable_metrics
|
63
|
-
Rack::ActionLogger.configuration.rack_content_types.any? { |c| content_type.include?(c) } || action_controller
|
64
|
+
Rack::ActionLogger.configuration.rack_content_types.any? { |c| content_type.to_s.include?(c) } || action_controller
|
64
65
|
end
|
65
66
|
|
66
67
|
def action_controller
|