class Quandl::Logger

Constants

VERSION

Public Class Methods

info_with_elapsed(message=nil, &block) click to toggle source
# File lib/quandl/logger.rb, line 30
def info_with_elapsed(message=nil, &block)
  timer = Time.now
  result = block.call
  info("#{message} (#{timer.elapsed.microseconds}ms)")
  result
end
logger() click to toggle source
# File lib/quandl/logger.rb, line 21
def logger
  @@logger if defined?(@@logger)
end
use(value) click to toggle source
# File lib/quandl/logger.rb, line 25
def use(value)
  return use_file(value) if value.kind_of?(String)
  @@logger = value
end

Protected Class Methods

use_file(file) click to toggle source
# File lib/quandl/logger.rb, line 39
def use_file(file)
  # convert string to logger
  file = ::Logger.new(file) if file.kind_of?(String)
  # assign Logger
  @@logger = file
end