ezlog 0.9.6 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +1 -0
- data/lib/ezlog/rails/log_exceptions.rb +7 -1
- data/lib/ezlog/railtie.rb +7 -2
- data/lib/ezlog/rspec/matchers.rb +2 -0
- data/lib/ezlog/version.rb +1 -1
- data/repo-info.json +7 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87d8d02b49c53db6341c59ac754514278c34ba88b2aa7d2b6391dee02fddef83
|
4
|
+
data.tar.gz: db7a2efb57161bac874a8d60747d1a0b9760eda901e069efe8ea6e57beb85308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9a7279d5cb5996dbd97b0bf18101b9b176bdb0cd7e7f5a9cc0b6297fb1037243f7fe7ef145f885d8876d3627d2c2930d8ab46fd51640265837e9ab97df66417
|
7
|
+
data.tar.gz: 6e16681888b8449e75c79a2a74775e153c49e4a3f1dc9e06c5f73a9d0159ca77e03ab5cdda5bcc8f3e00b4bf4c192901976c1130fedb862af666f58da089e6ba
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
### 0.10.1 (2022-01-22)
|
2
|
+
|
3
|
+
[Full Changelog](https://github.com/emartech/ezlog/compare/v0.10.0...v0.10.1)
|
4
|
+
|
5
|
+
* Fix
|
6
|
+
* Fixed a bug where `ActionView::LogSubscriber` was potentially not (eager)loaded by the time we tried to detach it.
|
7
|
+
With this fix Rails 6.1 running on Ruby 3 should be fully supported.
|
8
|
+
|
9
|
+
### 0.10.0 (2021-07-01)
|
10
|
+
|
11
|
+
[Full Changelog](https://github.com/emartech/ezlog/compare/v0.9.6...v0.10.0)
|
12
|
+
|
13
|
+
* Features & enhancements
|
14
|
+
* Do not log exceptions which are handled by Rails. Therefore you can't get false alarms from your exception notifier
|
15
|
+
|
1
16
|
### 0.9.6 (2021-06-30)
|
2
17
|
|
3
18
|
[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
|
data/lib/ezlog/railtie.rb
CHANGED
@@ -42,7 +42,10 @@ module Ezlog
|
|
42
42
|
case ::Rails::VERSION::MAJOR
|
43
43
|
when 6
|
44
44
|
::ActionController::LogSubscriber.detach_from :action_controller
|
45
|
-
::ActionView
|
45
|
+
if defined? ::ActionView
|
46
|
+
require 'action_view/log_subscriber' unless defined? ::ActionView::LogSubscriber
|
47
|
+
::ActionView::LogSubscriber.detach_from :action_view
|
48
|
+
end
|
46
49
|
if defined? ::ActiveRecord
|
47
50
|
::ActiveRecord::LogSubscriber.detach_from :active_record
|
48
51
|
Ezlog::Rails::LogSubscriber.attach Ezlog::Rails::ActiveRecord::LogSubscriber, :active_record
|
@@ -70,7 +73,9 @@ module Ezlog
|
|
70
73
|
::Sidekiq.configure_server do |config|
|
71
74
|
config.options[:job_logger] = Ezlog::Sidekiq::JobLogger
|
72
75
|
config.error_handlers << Ezlog::Sidekiq::ErrorLogger.new
|
73
|
-
|
76
|
+
if defined?(::Sidekiq::ExceptionHandler) && defined?(::Sidekiq::ExceptionHandler::Logger)
|
77
|
+
config.error_handlers.delete_if { |handler| handler.is_a? ::Sidekiq::ExceptionHandler::Logger }
|
78
|
+
end
|
74
79
|
config.death_handlers << Ezlog::Sidekiq::DeathLogger.new
|
75
80
|
end
|
76
81
|
end
|
data/lib/ezlog/rspec/matchers.rb
CHANGED
data/lib/ezlog/version.rb
CHANGED
data/repo-info.json
ADDED
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.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zoltan Ormandi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '5.0'
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email:
|
141
141
|
- zoltan.ormandi@emarsys.com
|
142
142
|
executables: []
|
@@ -172,12 +172,13 @@ files:
|
|
172
172
|
- lib/ezlog/sidekiq/job_logger.rb
|
173
173
|
- lib/ezlog/version.rb
|
174
174
|
- lib/sequel/extensions/ezlog_logging.rb
|
175
|
+
- repo-info.json
|
175
176
|
homepage: https://github.com/emartech/ezlog
|
176
177
|
licenses:
|
177
178
|
- MIT
|
178
179
|
metadata:
|
179
180
|
changelog_uri: https://github.com/emartech/ezlog/blob/master/CHANGELOG.md
|
180
|
-
post_install_message:
|
181
|
+
post_install_message:
|
181
182
|
rdoc_options: []
|
182
183
|
require_paths:
|
183
184
|
- lib
|
@@ -192,8 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
193
|
- !ruby/object:Gem::Version
|
193
194
|
version: '0'
|
194
195
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
196
|
-
signing_key:
|
196
|
+
rubygems_version: 3.3.7
|
197
|
+
signing_key:
|
197
198
|
specification_version: 4
|
198
199
|
summary: A zero-configuration logging solution for projects using Sidekiq, Rails,
|
199
200
|
Sequel, etc.
|