Class: Riserva::Log
- Inherits:
-
Object
- Object
- Riserva::Log
- Defined in:
- lib/riserva/log.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize ⇒ Log
constructor
A new instance of Log.
Constructor Details
#initialize ⇒ Log
Returns a new instance of Log.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/riserva/log.rb', line 9 def initialize @logger = Logger.new( Riserva::Config.read('log.filename') || STDOUT, Riserva::Config.read('log.files_to_keep') || 1, Riserva::Config.read('log.size') || 100 * 1024 ) @logger.datetime_format = datetime_format @logger.formatter = formatter end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
7 8 9 |
# File 'lib/riserva/log.rb', line 7 def logger @logger end |