Module: Cequel::Metal::Logging

Included in:
Keyspace
Defined in:
lib/cequel/metal/logging.rb

Overview

Methods to handle logging for Keyspace instances

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#logger=(logger) ⇒ Object

Since:

  • 1.0.0



7
8
9
10
# File 'lib/cequel/metal/logging.rb', line 7

def logger=(logger)
  loggers << Logger.new(logger, ::Logger::DEBUG)
  self.exception_logger = ExceptionLogger.new(logger, ::Logger::ERROR)
end

#slowlog=(slowlog) ⇒ Object

Since:

  • 1.0.0



12
13
14
15
16
# File 'lib/cequel/metal/logging.rb', line 12

def slowlog=(slowlog)
  warn "#slowlog= is deprecated and will be removed from a future " \
       "version"
  loggers << @slowlog = Logger.new(slowlog, ::Logger::WARN, 2000)
end

#slowlog_threshold=(threshold) ⇒ Object

Since:

  • 1.0.0



18
19
20
# File 'lib/cequel/metal/logging.rb', line 18

def slowlog_threshold=(threshold)
  @slowlog.threshold = threshold
end