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:

  • the value to set the attribute level_threshold to.



151
152
153
# File 'lib/transaction_logger.rb', line 151

def level_threshold=(value)
  @level_threshold = value
end

.loggerObject

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



142
143
144
# File 'lib/transaction_logger.rb', line 142

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:

  • Any String or Object that responds to to_s



119
120
121
# File 'lib/transaction_logger.rb', line 119

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