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 +4 -4
- data/CHANGELOG +5 -0
- data/lib/lumber/railtie.rb +14 -7
- data/lib/lumber/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c21e09e63cdd07d385285de3a1cff95010142484
|
4
|
+
data.tar.gz: 0d988057d2cd29655df47bd152ddcb895b210e7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68b77ee858bade7f46862d63fa17a822b2f01f1bf9cc58aecb940da7dcae0ddbe53d2f39ed2ce2c80817a94a1b7a2c95418c84d1726c4a229e0c5ae79b353974
|
7
|
+
data.tar.gz: 82b265689f2115815cff45fabfd9d41eb03b35bcbf077877478ce2ef4d2a5aff4074f985d2fc7c20b80412066f806201bd5aa7514c269d3eb9d301da7170590d
|
data/CHANGELOG
CHANGED
data/lib/lumber/railtie.rb
CHANGED
@@ -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
|
-
|
21
|
-
|
22
|
-
|
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
|
data/lib/lumber/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: log4r
|