smart_logger_wrapper 0.5.1 → 0.5.2

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: 9d85fb54a1c93b6fa1438590e23c21259349451a0856adfd5ce775656ada1d4a
4
- data.tar.gz: 78a9c0297f38cc6d326aa6bf36bc270feab954e6cc19b8aeb3d6b39d19371f06
3
+ metadata.gz: dc03b7c24cdb66ea1cb37dc33e5da9cb160853ce7e68a340fe6cbf85e79f1d0c
4
+ data.tar.gz: e2a20ca06d157c9b51865ce5fb9500ef923a18f2f9ec29b9b776a1608f92ffa0
5
5
  SHA512:
6
- metadata.gz: 220771b11522adaee420b9cd9b78d0fd08be250986e896922215afd56ad0a63fe4cc3246d73eae598ebc5dcefa0b4453e91a0448fb8a304c06f9124644cb651f
7
- data.tar.gz: 9705bdd7ab9f8f119c5d598f82d15990826b635e9312c2b0706088fec31306963c6e95e68a283bdd10681c303e5d77004bfeacfac5727154a32c26fc811527ef
6
+ metadata.gz: 6e673e853b7cf0a3ec3e03689e5c6c043cd2f14552a584fac1a430eda2032336d49fa50bb1d8684492bd362612d44faf5829cbec22d4bb6b67a76af56bcd5e9c
7
+ data.tar.gz: 19a86fdfbe0bad5edcdf1ff759a574523a229205b03d4eba0c94443d89553b1c667842d9fdbd2dc28ac0e002455fd740feb0e2fb9d5f3a7b1025d3b39940309d
@@ -29,7 +29,7 @@ class SmartLoggerWrapper < Logger
29
29
  private
30
30
 
31
31
  def location_important?(location)
32
- ! clean_backtrace(location.map(&:to_s)).empty?
32
+ ! clean_backtrace(location.map(&:to_s), keeps_first: false).empty?
33
33
  end
34
34
  end
35
35
 
@@ -12,11 +12,15 @@ class SmartLoggerWrapper < Logger
12
12
  length == nil ? backtrace.to_a : backtrace.first(length)
13
13
  end
14
14
 
15
- def clean_backtrace(backtrace)
15
+ def clean_backtrace(backtrace, keeps_first: true)
16
16
  (
17
17
  if defined?(::Rails) && ::Rails.respond_to?(:backtrace_cleaner)
18
- head, *tail = backtrace
19
- [head] + Rails.backtrace_cleaner.filter(tail)
18
+ if keeps_first
19
+ head, *tail = backtrace
20
+ [head] + Rails.backtrace_cleaner.filter(tail)
21
+ else
22
+ Rails.backtrace_cleaner.filter(backtrace)
23
+ end
20
24
  else
21
25
  backtrace
22
26
  end
@@ -1,5 +1,5 @@
1
1
  require 'logger'
2
2
 
3
3
  class SmartLoggerWrapper < Logger
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_logger_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akihiro Katsura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-06 00:00:00.000000000 Z
11
+ date: 2018-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler