Class: TransactionLogger::Configure

Inherits:
Object
  • Object
show all
Defined in:
lib/transaction_logger.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.level_threshold=(value) ⇒ Object (writeonly)

Sets the attribute level_threshold

Parameters:

  • value

    the value to set the attribute level_threshold to.



140
141
142
# File 'lib/transaction_logger.rb', line 140

def level_threshold=(value)
  @level_threshold = value
end

.loggerObject

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



131
132
133
# File 'lib/transaction_logger.rb', line 131

def self.logger
  @logger ||= Logger.new(STDOUT)
end

Class Method Details

.log_prefix=(prefix) ⇒ Object

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" }.

Parameters:

  • prefix (#to_s)

    Any String or Object that responds to to_s



108
109
110
# File 'lib/transaction_logger.rb', line 108

def self.log_prefix=(prefix)
  @prefix = prefix
end