Module: DCA::Helpers::Logger::ClassMethods

Defined in:
lib/dca/helpers/logger.rb

Instance Method Summary collapse

Instance Method Details

#logger=(value) ⇒ Object



39
40
41
# File 'lib/dca/helpers/logger.rb', line 39

def logger= value
  @logger = value
end

#logger_name(name) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/dca/helpers/logger.rb', line 30

def logger_name name
  define_method :logger do
    @logger unless @logger.nil?

    out = APP_CONFIG[:logger] ? File.join(DCA.root, 'log', "#{(self.class.send name).underscore}.log") : NIL
    @logger ||= VerboseLogger.new out, 0, 1048576, APP_CONFIG[:verbose]
  end
end