Sha256: 89dd6a736b60cd81e1645c5a37cb9b3189d4f1857f9f053ccc0a952f70471166

Contents?: true

Size: 353 Bytes

Versions: 3

Compression:

Stored size: 353 Bytes

Contents

# frozen_string_literal: true

module ActiveRecordPostgresqlXverify
  class << self
    def logger
      @logger ||= if defined?(Rails)
                    Rails.logger || ActiveRecord::Base.logger || Logger.new($stderr)
                  else
                    ActiveRecord::Base.logger || Logger.new($stderr)
                  end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_record_postgresql_xverify-0.2.0 lib/active_record_postgresql_xverify/logger.rb
active_record_postgresql_xverify-0.1.1 lib/active_record_postgresql_xverify/logger.rb
active_record_postgresql_xverify-0.1.0 lib/active_record_postgresql_xverify/logger.rb