Sha256: aa6774899e82ddad4e9826de93877ec490baa2059443beb3a191f14967c2be3d

Contents?: true

Size: 551 Bytes

Versions: 18

Compression:

Stored size: 551 Bytes

Contents

require 'logger'

module Urbanairship
  module Loggable
    def logger
      Loggable.logger
    end

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

    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
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
urbanairship-9.2.0 lib/urbanairship/loggable.rb
urbanairship-9.1.1 lib/urbanairship/loggable.rb
urbanairship-9.1.0 lib/urbanairship/loggable.rb
urbanairship-9.0.0 lib/urbanairship/loggable.rb
urbanairship-8.0.1 lib/urbanairship/loggable.rb
urbanairship-8.0.0 lib/urbanairship/loggable.rb
urbanairship-7.0.0 lib/urbanairship/loggable.rb
urbanairship-6.0.0 lib/urbanairship/loggable.rb
urbanairship-5.9.0 lib/urbanairship/loggable.rb
urbanairship-5.8.0 lib/urbanairship/loggable.rb
urbanairship-5.7.0 lib/urbanairship/loggable.rb
urbanairship-5.6.1 lib/urbanairship/loggable.rb
urbanairship-5.6.0 lib/urbanairship/loggable.rb
urbanairship-5.5.1 lib/urbanairship/loggable.rb
urbanairship-5.5.0 lib/urbanairship/loggable.rb
urbanairship-5.4.0 lib/urbanairship/loggable.rb
urbanairship-5.3.0 lib/urbanairship/loggable.rb
urbanairship-5.2.0 lib/urbanairship/loggable.rb