Class: PuppetBox::Logger
- Inherits:
-
Object
- Object
- PuppetBox::Logger
- Defined in:
- lib/puppetbox/logger.rb
Overview
Logger is a class to allow for stateful and separate logs between instances by passing in individual loggers on initialisation
Instance Method Summary collapse
-
#initialize(logger = nil) ⇒ Logger
constructor
A new instance of Logger.
- #logger ⇒ Object
Constructor Details
#initialize(logger = nil) ⇒ Logger
Returns a new instance of Logger.
6 7 8 9 10 11 12 |
# File 'lib/puppetbox/logger.rb', line 6 def initialize(logger=nil) if logger @logger = logger else logger = Logger.new(STDOUT) end end |
Instance Method Details
#logger ⇒ Object
14 15 16 |
# File 'lib/puppetbox/logger.rb', line 14 def logger @logger end |