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
140 141 142 |
# File 'lib/transaction_logger.rb', line 140 def level_threshold=(value) @level_threshold = value end |
.logger ⇒ Object
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" }.
108 109 110 |
# File 'lib/transaction_logger.rb', line 108 def self.log_prefix=(prefix) @prefix = prefix end |