quandl_logger 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/quandl/logger.rb +5 -2
- data/lib/quandl/logger/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
## Quandl logger class for use in quandl gems.
|
data/lib/quandl/logger.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'logger'
|
2
|
+
|
1
3
|
require 'quandl/logger/version'
|
2
4
|
|
3
5
|
require "active_support"
|
@@ -19,8 +21,9 @@ module Quandl
|
|
19
21
|
@@logger if defined?(@@logger)
|
20
22
|
end
|
21
23
|
|
22
|
-
def use(
|
23
|
-
|
24
|
+
def use(log_file)
|
25
|
+
log_file = ::Logger.new(log_file) if log_file.is_a?(String)
|
26
|
+
@@logger = log_file
|
24
27
|
end
|
25
28
|
|
26
29
|
end
|