Module: Onuro::Loggable

Included in:
BaseRule, Engine, Event
Defined in:
lib/onuro/loggable.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.loggerObject

Global, memoized, lazy initialized instance of a logger



12
13
14
# File 'lib/onuro/loggable.rb', line 12

def self.logger
  @logger ||= ActiveSupport::Logger.new(logger_file, 10, 1_024_000)
end

.logger_fileObject



16
17
18
# File 'lib/onuro/loggable.rb', line 16

def self.logger_file
  'log/onuro_engine.log'
end

Instance Method Details

#loggerObject



7
8
9
# File 'lib/onuro/loggable.rb', line 7

def logger
  Loggable.logger
end