weather-sage 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weather-sage.rb +1 -1
- data/lib/weather-sage/cli/env/log.rb +6 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b661cb5dcac76ec4b94612d762a34b7b4614bb4bc145143e4dfaf7fe90d05f0a
|
4
|
+
data.tar.gz: eb9e4276c9960ddddeec4b9657cab4312acd4f6ce9f1e58750a681978a657656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 930ab6cb3bf3bec99c3354d3395eaf97dff6f838640af850750c1efabd5545935382cfcdb82a695d01592266d0c118f28dd02873db955d99c6548118c0f18702
|
7
|
+
data.tar.gz: c0f2d45666a1fa48e81ec94ecc1902eec9078731166a5183f5570ed94d8a8c5ca52f2ed668b4cff45a1c72792f9a38fc628374f2e3eba7644a4caac25e994f24
|
data/lib/weather-sage.rb
CHANGED
@@ -22,20 +22,17 @@ class WeatherSage::CLI::Env::Log < ::Logger
|
|
22
22
|
#
|
23
23
|
def initialize(env)
|
24
24
|
# get log level (default to "warn" if unspecified)
|
25
|
-
|
25
|
+
log_level = (env.get('LOG_LEVEL', DEFAULT_LEVEL)).upcase
|
26
26
|
|
27
|
-
# create logger
|
28
|
-
super(
|
29
|
-
# log path (default to STDERR)
|
30
|
-
env.get('LOG_PATH', STDERR),
|
27
|
+
# create logger from log path (default to STDERR)
|
28
|
+
super(env.get('LOG_PATH', STDERR))
|
31
29
|
|
32
|
-
|
33
|
-
|
34
|
-
)
|
30
|
+
# set log level (default to WARN)
|
31
|
+
self.level = ::Logger.const_get(log_level)
|
35
32
|
|
36
33
|
# log level
|
37
34
|
info('Env::Log#initialize') do
|
38
|
-
'level = %p' % [
|
35
|
+
'level = %p' % [log_level]
|
39
36
|
end
|
40
37
|
end
|
41
38
|
end
|