quandl_logger 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  class Logger
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
data/lib/quandl/logger.rb CHANGED
@@ -21,6 +21,13 @@ module Quandl
21
21
  @@logger if defined?(@@logger)
22
22
  end
23
23
 
24
+ def info_with_elapsed(message=nil, &block)
25
+ timer = Time.now
26
+ result = block.call
27
+ info("#{message} (#{timer.elapsed.microseconds}ms)")
28
+ result
29
+ end
30
+
24
31
  def use(log_file)
25
32
  log_file = ::Logger.new(log_file) if log_file.is_a?(String)
26
33
  @@logger = log_file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: