Module: DedicatedLogger::ClassMethods
- Defined in:
- lib/dedicated_logger.rb
Instance Method Summary collapse
Instance Method Details
#acts_as_dedicated_logger(options = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/dedicated_logger.rb', line 15 def acts_as_dedicated_logger ={} name = [:name] || self.name.to_s.underscore filepath = [:filepath] || File.join("log", "#{name}.log") @logger = DedicatedLogger::Base.new(name, filepath) end |
#logger ⇒ Object
21 22 23 |
# File 'lib/dedicated_logger.rb', line 21 def logger @logger || acts_as_dedicated_logger end |