Class: Moneta::Logger::Format
- Inherits:
-
Object
- Object
- Moneta::Logger::Format
- Defined in:
- lib/moneta/logger.rb
Overview
Standard formatter used by the logger
Instance Method Summary collapse
- #call(entry) ⇒ Object
-
#initialize(options) ⇒ Format
constructor
A new instance of Format.
Constructor Details
#initialize(options) ⇒ Format
Returns a new instance of Format.
8 9 10 11 |
# File 'lib/moneta/logger.rb', line 8 def initialize() @prefix = [:prefix] || 'Moneta ' @out = [:out] || STDOUT end |
Instance Method Details
#call(entry) ⇒ Object
13 14 15 |
# File 'lib/moneta/logger.rb', line 13 def call(entry) @out.write(format(entry)) end |