Module: Urbanairship::Loggable

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_loggerObject



13
14
15
16
17
18
19
20
# File 'lib/urbanairship/loggable.rb', line 13

def self.create_logger
  log_uri = [Urbanairship.configuration.log_path, 'urbanairship.log'].compact
  logger = Logger.new(File.join(*log_uri))
  logger.datetime_format = '%Y-%m-%d %H:%M:%S'
  logger.progname = 'Urbanairship'
  logger.level = Urbanairship.configuration.log_level
  logger
end

.loggerObject



9
10
11
# File 'lib/urbanairship/loggable.rb', line 9

def self.logger
  @logger ||= Urbanairship.configuration.custom_logger || Loggable.create_logger
end

Instance Method Details

#loggerObject



5
6
7
# File 'lib/urbanairship/loggable.rb', line 5

def logger
  Loggable.logger
end