ezlog 0.3.3 → 0.3.4

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
- SHA256:
3
- metadata.gz: e820d0ac516dc835494a109ac51e172f73f90be55e756ccc248a4a87fc7c890c
4
- data.tar.gz: 83153708c674634ccbe37193a7945038d3b1758e1f114b9cd33609c937cda102
2
+ SHA1:
3
+ metadata.gz: 2eb0df81d18a2611151924ec5b2fc43e00ff7deb
4
+ data.tar.gz: 578beb59e0b295f4d04feab4325762520e292447
5
5
  SHA512:
6
- metadata.gz: c68f24ec9b95d3175d1d2140cdf1b918704fda5d6dab419cf6a2dac370137860d4c25d2ef2433af660d124e80aa152138db3be8991e09da93bde0ba5d70b2867
7
- data.tar.gz: 0f1614756509f95871e96330aa95b2f498d91ed3be358d8b8d6b3c18699b5015511dac9c413b4e355f72ccc05f837ce86599908811572e2d928a85cacd9134b7
6
+ metadata.gz: 81d293e8d6b038d76c11ff7756ef7dfbc69d3e25f88cbc3001fc1cb017439ab9e1941d842691183ea662a974b5b96cd650a18089dd1958e0b3d7ed9c62dca107
7
+ data.tar.gz: 1d23b6d01ef33641dfc92746660dd71120c5302c3ec7dfb2080494644ce4bb4b4f09c4c69dbc28f87e85ee91f554c7c74e8878ef0b98beb0ad8045fda3c08b01
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ### 0.3.4 (2019-08-14)
2
+
3
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.3.3...v0.3.4)
4
+
5
+ * Bug fixes
6
+ * Ezlog is required when requiring `ezlog/rspec`. This way all dependencies are in place even if `Bundler.require`
7
+ wasn't called.
8
+ * Access log now correctly logs requests that fail with an uncaught error. Previously these requests were logged
9
+ with a path of `/500`.
10
+
1
11
  ### 0.3.3 (2019-08-10)
2
12
 
3
13
  [Full Changelog](https://github.com/emartech/ezlog/compare/v0.3.2...v0.3.3)
@@ -12,6 +12,9 @@ module Ezlog
12
12
  status, headers, body_lines = benchmark { @app.call(env) }
13
13
  log_request ActionDispatch::Request.new(env), status
14
14
  [status, headers, body_lines]
15
+ rescue Exception => ex
16
+ log_request ActionDispatch::Request.new(env), ActionDispatch::ExceptionWrapper.status_code_for_exception(ex.class.name)
17
+ raise
15
18
  end
16
19
 
17
20
  private
data/lib/ezlog/railtie.rb CHANGED
@@ -15,8 +15,9 @@ module Ezlog
15
15
 
16
16
  initializer 'ezlog.configure_middlewares' do |app|
17
17
  app.config.middleware.insert_after ::ActionDispatch::RequestId, Ezlog::Rails::RequestLogContext
18
- app.config.middleware.swap ::Rails::Rack::Logger, Ezlog::Rails::AccessLog, Ezlog.logger('AccessLog')
18
+ app.config.middleware.delete ::Rails::Rack::Logger
19
19
  app.config.middleware.swap ::ActionDispatch::DebugExceptions, Ezlog::Rails::DebugExceptions
20
+ app.config.middleware.insert_before Ezlog::Rails::DebugExceptions, Ezlog::Rails::AccessLog, Ezlog.logger('AccessLog')
20
21
  app.config.middleware.insert_after Ezlog::Rails::DebugExceptions, Ezlog::Rails::LogExceptions, Ezlog.logger('Application')
21
22
  end
22
23
 
data/lib/ezlog/rspec.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'ezlog'
1
2
  require 'rspec/logging_helper'
2
3
  require_relative 'rspec/helpers'
3
4
  require_relative 'rspec/matchers'
data/lib/ezlog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ezlog
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoltan Ormandi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-10 00:00:00.000000000 Z
11
+ date: 2019-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging
@@ -150,7 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubygems_version: 3.0.1
153
+ rubyforge_project:
154
+ rubygems_version: 2.6.13
154
155
  signing_key:
155
156
  specification_version: 4
156
157
  summary: A zero-configuration logging solution for projects using Sidekiq, Rails,