class TransactionLogger::Configure

Attributes

level_threshold[W]
logger[W]

Public Class Methods

log_prefix() click to toggle source

@private Returns the log_prefix

@return [String] The currently stored prefix.

# File lib/transaction_logger.rb, line 128
def self.log_prefix
  @prefix
end
log_prefix=(prefix) click to toggle source

Sets the hash keys on the TransactionLogger's log to have a prefix.

Using .log_prefix “str_”, the output of the log hash will contain keys prefixed with “str_”, such as { “str_name” => “Class.method” }.

@param prefix [#to_s] Any String or Object that responds to to_s

# File lib/transaction_logger.rb, line 119
def self.log_prefix=(prefix)
  @prefix = prefix
end
logger() click to toggle source

Sets the TransactionLogger's output to a new instance of Logger

# File lib/transaction_logger.rb, line 142
def self.logger
  @logger ||= Logger.new(STDOUT)
end