dry-logger 1.0.0.rc1 → 1.0.0.rc2

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: 343929c403f114dcb22a13c0406ef82982800e9bed8e58d483a86ab3442d7f13
4
- data.tar.gz: 2a224fba0dc7f8d5771219ba0bee0eef0322cefe11e14fbb49ca066319e68bca
3
+ metadata.gz: e5c096685f8199a216c865178cc4a5633975fa45e9b158e0a25254ec8edaa6b5
4
+ data.tar.gz: 48e24dcd35809d47677964fe48df6d9e6c32bc0bda00cbfe3ee0e0dd76681660
5
5
  SHA512:
6
- metadata.gz: e945a3fde7a2bc2fb8731ae46aabac59df1c8da6208d125d09759af04cc848f5b09453c66b7f65da49ecc79094809ea76746c1610b25f47980833965f43a8037
7
- data.tar.gz: 7af951d7152c84f8dbbec03a2c57bbd527b10791a39d585597885378036e823594b5d9b50754b765a445811fc46c3fb34d546a7c33a3a75f8de60b70bad90b88
6
+ metadata.gz: f298b5262eb94c6312122519bfcc17ced78512dfe53fe1db097c95aa68aa6cf717e7da0bde929e74c6d5df9f58938ce22e4e66167d96031e9d1530baded90311
7
+ data.tar.gz: e8413dddf934581b0fadaca47c108f53145ba8a5ad4603d9b02cfa0a6fbe89c1b29c933c51205a5e171619e69502a3e1f9658e6b19b763306e52f04768b4c0ce
@@ -128,7 +128,7 @@ module Dry
128
128
 
129
129
  BACKEND_METHODS.each do |name|
130
130
  define_method(name) do
131
- call(name)
131
+ forward(name)
132
132
  end
133
133
  end
134
134
 
@@ -161,7 +161,9 @@ module Dry
161
161
  payload: {**context, **payload}
162
162
  )
163
163
 
164
- each_backend { |backend| backend.__send__(severity, entry) if backend.log?(entry) }
164
+ each_backend do |backend|
165
+ backend.__send__(severity, entry) if !backend.respond_to?(:log?) || backend.log?(entry)
166
+ end
165
167
  end
166
168
 
167
169
  true
@@ -217,7 +219,7 @@ module Dry
217
219
  # @since 1.0.0
218
220
  # @return [true]
219
221
  # @api private
220
- def call(meth, ...)
222
+ def forward(meth, ...)
221
223
  each_backend { |backend| backend.public_send(meth, ...) }
222
224
  true
223
225
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Logger
5
- VERSION = "1.0.0.rc1"
5
+ VERSION = "1.0.0.rc2"
6
6
  end
7
7
  end
data/lib/dry/logger.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "stringio"
4
+
3
5
  require "dry/logger/constants"
4
6
  require "dry/logger/dispatcher"
5
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc1
4
+ version: 1.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-07 00:00:00.000000000 Z
11
+ date: 2022-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec