module Quandl::Cassandra::Base::Logging::ClassMethods

Public Instance Methods

execute(*args, &block) click to toggle source
Calls superclass method
# File lib/quandl/cassandra/base/logging.rb, line 17
def execute(*args, &block)
  statement = args.first.to_s
  statement = "#{statement[0..200]} ... #{statement.length} chars" if statement.length > 200
  t1 = Time.now
  begin
    r = super if defined?(super)
  ensure
    Logger.debug("(#{t1.elapsed_ms}) ".blue + " #{statement}")
  end
  r
end
prepare(*args, &block) click to toggle source
Calls superclass method
# File lib/quandl/cassandra/base/logging.rb, line 10
def prepare(*args, &block)
  statement = args.first.to_s
  statement = "#{statement[0..200]} ... #{statement.length} chars" if statement.length > 200
  Logger.debug(statement)
  super if defined?(super)
end