ezlog 0.9.6 → 0.10.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
  SHA256:
3
- metadata.gz: 178b2810c13ba87a8a1e389a6679e14f06e4b4f05bcc0a84dea797110cfde3a7
4
- data.tar.gz: ae3e3abfbf692e3189a5d6e1bfb1efe4ec3ce064e1e61285a2c13b27922e13fe
3
+ metadata.gz: 522f8d12a7a34a7aa83c51c6729dd212909979a3c0db32ad622436056be3ea03
4
+ data.tar.gz: ebf173e4431cb016de8e6a14b418b71106221982d3ebc082d53b2ed0a31fd3b5
5
5
  SHA512:
6
- metadata.gz: 21d6c1fa52dd9b46bbc33fc776d139d3c7c38492cb8f7f47bcfc577c47c53a8014197712993ece0a53807646fff222acca23e803df8af74c32ee820b4b895f7c
7
- data.tar.gz: 2ba5df5dcb18e3553f97f4727556626ad386e2e2c4dc16aefe261d3502cbe33d9fc163c439da8aa3a8392359eba43f15ea5a5da7501892da7e6c7e9e149b0553
6
+ metadata.gz: c9efef1e23b6b8b77689d513665676aad77340d04131ca6241b565ac2cf7e8e78f21dbb0adf8ea06ce2a76008b12d7d350cbd7ea35de6d2228367b486bbda7b8
7
+ data.tar.gz: 14a749943851eadf758f2e71f0a9680f9af86c2b2895e5a946918d50696fe1f19ccacb090b37f40935d972150fb18af1d6602bb93b711917a471b8d8b4ced249
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 0.10.0 (2021-07-01)
2
+
3
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.6...v0.10.0)
4
+
5
+ * Features & enhancements
6
+ * Do not log exceptions which are handled by Rails. Therefore you can't get false alarms from your exception notifier
7
+
1
8
  ### 0.9.6 (2021-06-30)
2
9
 
3
10
  [Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.5...v0.9.6)
data/README.md CHANGED
@@ -93,6 +93,7 @@ In addition to this, Ezlog also does the following:
93
93
  * It disables Rails's default logging of uncaught errors and injects its own error logger into the application, which
94
94
  * logs 1 line per error, including the error's name and context (stack trace, etc.),
95
95
  * logs every error at ERROR level instead of the default FATAL.
96
+ * does not log exceptions which are handled by Rails (`ActionDispatch::ExceptionWrapper.rescue_responses`)
96
97
  * It disables Rails's default request logging, which logs several lines per event during the processing of an action,
97
98
  and replaces the default Rack access log with its own access log middleware. The end result is an access log that
98
99
  * contains all relevant information (request ID, method, path, params, client IP, duration and response status code), and
@@ -9,9 +9,15 @@ module Ezlog
9
9
  def call(env)
10
10
  @app.call(env)
11
11
  rescue Exception => exception
12
- @logger.error exception
12
+ @logger.error exception unless handled?(exception)
13
13
  raise
14
14
  end
15
+
16
+ private
17
+
18
+ def handled?(exception)
19
+ ActionDispatch::ExceptionWrapper.rescue_responses.key? exception.class.name
20
+ end
15
21
  end
16
22
  end
17
23
  end
@@ -55,3 +55,5 @@ RSpec::Matchers.define :log do
55
55
  log_output_is_expected.to include_log_message(expected).at_level(log_level)
56
56
  end
57
57
  end
58
+
59
+ RSpec::Matchers.define_negated_matcher :not_log, :log
data/lib/ezlog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ezlog
2
- VERSION = '0.9.6'
2
+ VERSION = '0.10.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoltan Ormandi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2021-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  - !ruby/object:Gem::Version
193
193
  version: '0'
194
194
  requirements: []
195
- rubygems_version: 3.1.6
195
+ rubygems_version: 3.1.2
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: A zero-configuration logging solution for projects using Sidekiq, Rails,