rails-autoscale-core 1.0.3 → 1.1.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: e2f99603cfd35f701404cbfa545fe57c3bcb7fbf3ff8704fd3b6f2420630c746
4
- data.tar.gz: 32be56ecbf6f42ca5b46840b52879dacb7b9d6d98321c101f5c659f03f671650
3
+ metadata.gz: 9511ffa2f674001bd42f63d5f268dbc50136983bcea2016636d233c73ebb9c4b
4
+ data.tar.gz: 0e60e93e4f199c902f79bc95a2e8878c22692af63e3c505607bb00078ef6567d
5
5
  SHA512:
6
- metadata.gz: 8772831925e066e41995d1d50ddd5815aa299d91aa66b828a93855cf30fa7d95c8571e1ee57475af7772cf898c7963846d0f9e380533c0b1e4bd65a679c6f7fb
7
- data.tar.gz: cb01fa90491ca125c5d007a1079542a715e33fcb26cee57d84ad4028ee946bf27ab5d2d761bfd881c2b49ccd8d3f48ab29fec6b373491dde208c0dd7cb75e7bb
6
+ metadata.gz: ecf60049d1fc3b2b09c5a876761d8183b1637a0c505c209ec9339b549950cf25c370b77528670e70d917d69f2c56356dc93b9e7df677a0daba3876e86a78c3c4
7
+ data.tar.gz: 3e6402c3d2c9ffe690ee2428ce1d9b875546929dd0a944061005f7fa61cd52c4537a06cbc8af3782dbf298a766cba25cd63ff4529501f55b0c94815e06977ed1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails-autoscale-core (1.0.3)
4
+ rails-autoscale-core (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,17 +11,20 @@ module RailsAutoscale
11
11
  end
12
12
 
13
13
  class LoggerProxy < Struct.new(:logger, :log_level)
14
- %w[ERROR WARN INFO DEBUG].each do |severity_name|
14
+ %w[ERROR WARN INFO DEBUG FATAL].each do |severity_name|
15
15
  severity_level = ::Logger::Severity.const_get(severity_name)
16
16
 
17
17
  define_method(severity_name.downcase) do |*messages|
18
18
  if log_level.nil?
19
- logger.add(severity_level) { tag(messages) }
19
+ logger.public_send(severity_name.downcase) { tag(messages) }
20
20
  elsif severity_level >= log_level
21
21
  if severity_level >= logger.level
22
- logger.add(severity_level) { tag(messages) }
22
+ logger.public_send(severity_name.downcase) { tag(messages) }
23
23
  else
24
- logger.add(logger.level) { tag(messages, tag_level: severity_name) }
24
+ # Our logger proxy is configured with a lower severity level than the underlying logger,
25
+ # so send this message using the underlying logger severity instead of the actual severity.
26
+ logger_severity_name = ::Logger::SEV_LABEL[logger.level].downcase
27
+ logger.public_send(logger_severity_name) { tag(messages, tag_level: severity_name) }
25
28
  end
26
29
  end
27
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAutoscale
4
- VERSION = "1.0.3"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-autoscale-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam McCrea
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-03 00:00:00.000000000 Z
12
+ date: 2022-10-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: