loga 1.2.1 → 1.3.0
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.
- checksums.yaml +4 -4
- data/lib/loga/ext/rails/rack/debug_exceptions.rb +8 -0
- data/lib/loga/railtie.rb +5 -0
- data/lib/loga/version.rb +1 -1
- data/spec/integration/rails/request_spec.rb +8 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d80b5262e82d731ffe726e5d5ac426fdb45ff2b
|
4
|
+
data.tar.gz: c381e133eeab921a94eaef9da70cca372cc72481
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f67f325796cad9a8bdda68808a58be8e9d6b832a8fddf0384ce9fcb78f5c81d4dd9904677d38fb093c77041c725d1a1c289a68099ca9012b98d23e4ad963611
|
7
|
+
data.tar.gz: 5d7d794111c10736db8fe81ca3e52ec7691d42ad5af713cbe8cb6a715b4e0e96beda1afeb71c53f4e61b524cc63f277e6f2b2fafe9e3f9ec8a16b862002d7dc0
|
data/lib/loga/railtie.rb
CHANGED
@@ -63,6 +63,7 @@ module Loga
|
|
63
63
|
insert_loga_rack_logger
|
64
64
|
disable_rails_rack_logger
|
65
65
|
insert_exceptions_catcher
|
66
|
+
disable_action_dispatch_debug_exceptions
|
66
67
|
end
|
67
68
|
|
68
69
|
private
|
@@ -88,6 +89,10 @@ module Loga
|
|
88
89
|
end
|
89
90
|
end
|
90
91
|
|
92
|
+
def disable_action_dispatch_debug_exceptions
|
93
|
+
require 'loga/ext/rails/rack/debug_exceptions.rb'
|
94
|
+
end
|
95
|
+
|
91
96
|
def insert_loga_rack_logger
|
92
97
|
app.middleware.insert_after Rails::Rack::Logger,
|
93
98
|
Loga::Rack::Logger,
|
data/lib/loga/version.rb
CHANGED
@@ -39,4 +39,12 @@ describe 'Integration with Rails', timecop: true do
|
|
39
39
|
expect(action_view_notifications).to be_empty
|
40
40
|
end
|
41
41
|
end
|
42
|
+
|
43
|
+
describe 'when request causes ActionDispatch 404' do
|
44
|
+
it 'does not log ActionDispatch::DebugExceptions' do
|
45
|
+
get '/not_found', {}, 'HTTP_X_REQUEST_ID' => '471a34dc'
|
46
|
+
expect(json_entries.count).to eq(1)
|
47
|
+
expect(json['short_message']).to eq('GET /not_found 404 in 0ms')
|
48
|
+
end
|
49
|
+
end
|
42
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Funding Circle
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- lib/loga.rb
|
175
175
|
- lib/loga/configuration.rb
|
176
176
|
- lib/loga/event.rb
|
177
|
+
- lib/loga/ext/rails/rack/debug_exceptions.rb
|
177
178
|
- lib/loga/ext/rails/rack/logger3.rb
|
178
179
|
- lib/loga/ext/rails/rack/logger4.rb
|
179
180
|
- lib/loga/formatter.rb
|