loga 1.2.1 → 1.3.0

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: 17260ebae7ab260f967e12b4ccbc3a0759198c48
4
- data.tar.gz: b9d0b278cecffc630df5c3799534212a299947b5
3
+ metadata.gz: 4d80b5262e82d731ffe726e5d5ac426fdb45ff2b
4
+ data.tar.gz: c381e133eeab921a94eaef9da70cca372cc72481
5
5
  SHA512:
6
- metadata.gz: fae482314860b620502fbf5e122cc08cf06cd75395feed1686dfa6730226077960e08a3a0a6395acd76e5bbff50b0c37315b1cc1c82da38fab20121b0ff57f3e
7
- data.tar.gz: f9b6740e461e66035880ce0072d6427db6120c91bf6a3662707989a3bfda872b2a1dbae0659b00b5f6877fbc0b4b77e6afc557451a837b1963c121646b337013
6
+ metadata.gz: 2f67f325796cad9a8bdda68808a58be8e9d6b832a8fddf0384ce9fcb78f5c81d4dd9904677d38fb093c77041c725d1a1c289a68099ca9012b98d23e4ad963611
7
+ data.tar.gz: 5d7d794111c10736db8fe81ca3e52ec7691d42ad5af713cbe8cb6a715b4e0e96beda1afeb71c53f4e61b524cc63f277e6f2b2fafe9e3f9ec8a16b862002d7dc0
@@ -0,0 +1,8 @@
1
+ module ActionDispatch
2
+ class DebugExceptions
3
+ private
4
+
5
+ def logger(_request)
6
+ end
7
+ end
8
+ end
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
@@ -1,3 +1,3 @@
1
1
  module Loga
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
@@ -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.2.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