Module: Smess::Logging

Included in:
Clickatell, HttpBase, Ipx, Mblox, Twilio
Defined in:
lib/smess/logging.rb

Instance Method Summary collapse

Instance Method Details

#loggerObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/smess/logging.rb', line 4

def logger
  # use the Rails logger if it's defined
  @logger ||= if defined?(Rails)
    Rails.logger
  else
    l = ::Logger.new(STDOUT)
    l.level = Logger::WARN
    l
  end
end