Module: Rave::Mixins::Logger

Included in:
Controller, DataFormat, Rave::Models::Blip, Rave::Models::Component, Rave::Models::Wavelet
Defined in:
lib/mixins/logger.rb

Instance Method Summary collapse

Instance Method Details

#loggerObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/mixins/logger.rb', line 5

def logger
  if @logger.nil?
    if RUBY_PLATFORM == 'java'
      @logger = java.util.logging.Logger.getLogger(self.class.to_s)
    else
      #TODO: Need to be able to configure output
      @logger = ::Logger.new(STDOUT)
    end
  end
  @logger
end