lumber 1.1.2 → 1.1.3

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
  SHA1:
3
- metadata.gz: 1c8902471a988520ff9f66e8b6d83ee60765d0fd
4
- data.tar.gz: 534b54871782a8a75193454433931e330622e6a7
3
+ metadata.gz: c21e09e63cdd07d385285de3a1cff95010142484
4
+ data.tar.gz: 0d988057d2cd29655df47bd152ddcb895b210e7b
5
5
  SHA512:
6
- metadata.gz: dfe083431402148573389d79bff9688de0419297ecd4120b8a145c47d7bdbd8be11faa6829213ce51a52f1b3f836a686085f3fe57fb1f790932e2edaa0dcf7a1
7
- data.tar.gz: 91833cd5e0327f1c247b0d823c29c7cdc3f7bce9cb64fd56dd560c72be96135cc8b5744daf7327cabae4f0dd061ec48a9526034138c7222c6a5cfd4bb4412532
6
+ metadata.gz: 68b77ee858bade7f46862d63fa17a822b2f01f1bf9cc58aecb940da7dcae0ddbe53d2f39ed2ce2c80817a94a1b7a2c95418c84d1726c4a229e0c5ae79b353974
7
+ data.tar.gz: 82b265689f2115815cff45fabfd9d41eb03b35bcbf077877478ce2ef4d2a5aff4074f985d2fc7c20b80412066f806201bd5aa7514c269d3eb9d301da7170590d
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 1.1.3 (12/20/2013)
2
+ ------------------
3
+
4
+ set the Rails.logger level after init to workaround https://github.com/rails/rails/issues/13421 <25b121c> [Matt Conway]
5
+
1
6
  1.1.2 (12/17/2013)
2
7
  ------------------
3
8
 
@@ -17,18 +17,25 @@ module Lumber
17
17
  end
18
18
  app.config.logger = Lumber.find_or_create_logger(Lumber::BASE_LOGGER)
19
19
 
20
- config_level = app.config.log_level
21
- if config_level.present?
22
- level_str = config_level.to_s.upcase
23
- level = Log4r::LNAMES.index(level_str)
24
- raise "Invalid log level: #{config_level}" unless level
25
- app.config.logger.level = level
26
- else
20
+ # backwards compat for setting log_level to '' to defer to log4r.yml
21
+ # log_level needs to be set for rails >= 4.0.2
22
+ if app.config.log_level.blank?
27
23
  app.config.log_level = Log4r::LNAMES[app.config.logger.level]
28
24
  end
29
25
  end
30
26
  end
31
27
 
28
+ initializer "lumber.set_logger_level", :after => :initialize_logger do |app|
29
+ # Set the level on logger to workaround rails forcing level
30
+ # to a ::Logger constant in the :initialize_logger initializer
31
+ # https://github.com/rails/rails/issues/13421
32
+ config_level = app.config.log_level
33
+ level_str = config_level.to_s.upcase
34
+ level = Log4r::LNAMES.index(level_str)
35
+ raise "Invalid log level: #{config_level}" unless level
36
+ app.config.logger.level = level
37
+ end
38
+
32
39
  initializer "lumber.initialize_cache", :after => :initialize_cache do |app|
33
40
  # Only set the cache to Rails.cache if the user hasn't
34
41
  # specified a different monitor_store
@@ -1,3 +1,3 @@
1
1
  module Lumber
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-17 00:00:00.000000000 Z
11
+ date: 2013-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: log4r