easy_app_helper 3.0.4 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/easy_app_helper/logger/initializer.rb +13 -6
- data/lib/easy_app_helper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cff7c567e3d04bca5334d5d0e15acb0ec7bae4a2
|
|
4
|
+
data.tar.gz: 949b974386711ceb25166be08e18da2da079c0bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2f5c95ce7f783c97dc8d96997b38a28fe5cdd00236a233894aec355b696c56ffe5bbe60b2ee99494ff05f11c3ca7f22ddb97ec3b6273e255e95566738b8b98b
|
|
7
|
+
data.tar.gz: 487da2602289331ce22c4a33e5abd2ceadbcc6a22d0fcd1a38f47dd3c2363ac525879266b1e01e3387ad09f85fcabecbceda6a0559d904e65d872bad5dd5838f
|
|
@@ -19,12 +19,13 @@ module EasyAppHelper
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def self.build_logger
|
|
22
|
-
log_device =
|
|
23
|
-
|
|
22
|
+
log_device = File::NULL
|
|
23
|
+
if EasyAppHelper.config[:debug]
|
|
24
|
+
log_device = if EasyAppHelper.config[:'log-file']
|
|
24
25
|
if File.writable? EasyAppHelper.config[:'log-file']
|
|
25
26
|
EasyAppHelper.config[:'log-file']
|
|
26
27
|
else
|
|
27
|
-
puts
|
|
28
|
+
STDERR.puts "WARNING: Log file '#{EasyAppHelper.config[:'log-file']}' is not writable. Switching to STDERR..."
|
|
28
29
|
EasyAppHelper.config[:'log-file'] = nil
|
|
29
30
|
STDERR
|
|
30
31
|
end
|
|
@@ -33,9 +34,15 @@ module EasyAppHelper
|
|
|
33
34
|
else
|
|
34
35
|
STDOUT
|
|
35
36
|
end
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
39
46
|
setup_logger(::Logger.new log_device)
|
|
40
47
|
end
|
|
41
48
|
|