Class: TransactionLogger::Configure
- Inherits:
-
Object
- Object
- TransactionLogger::Configure
- Defined in:
- lib/transaction_logger.rb
Class Attribute Summary collapse
-
.level_threshold ⇒ Object
writeonly
Sets the attribute level_threshold.
-
.logger ⇒ Object
Sets the TransactionLogger's output to a new instance of Logger.
Class Method Summary collapse
-
.log_prefix=(prefix) ⇒ Object
Sets the hash keys on the TransactionLogger's log to have a prefix.
Class Attribute Details
.level_threshold=(value) ⇒ Object (writeonly)
Sets the attribute level_threshold
151 152 153 |
# File 'lib/transaction_logger.rb', line 151 def level_threshold=(value) @level_threshold = value end |
.logger ⇒ Object
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" }.
119 120 121 |
# File 'lib/transaction_logger.rb', line 119 def self.log_prefix=(prefix) @prefix = prefix end |