Class: Rnotifier::Rlogger

Inherits:
Object
  • Object
show all
Defined in:
lib/rnotifier/rlogger.rb

Constant Summary collapse

TAG =
'[RNOTIFIER]'

Class Method Summary collapse

Class Method Details

.initObject



15
16
17
18
19
20
21
22
# File 'lib/rnotifier/rlogger.rb', line 15

def init
  @logger = if defined?(Rails) && Rails.respond_to?(:logger) 
              Rails.logger
            else
              require 'logger' unless defined?(Logger)
              Logger.new($stdout)
            end
end

.loggerObject



24
25
26
# File 'lib/rnotifier/rlogger.rb', line 24

def logger
  @logger
end