Sha256: 5af48f43604680b9b8a81e02c59f467763b59fdf33b5e794f9530a04c43346ad

Contents?: true

Size: 348 Bytes

Versions: 6

Compression:

Stored size: 348 Bytes

Contents

# frozen_string_literal: true

module ActiveRecordMysqlXverify
  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

6 entries across 6 versions & 1 rubygems

Version Path
active_record_mysql_xverify-0.4.0 lib/active_record_mysql_xverify/logger.rb
active_record_mysql_xverify-0.3.0 lib/active_record_mysql_xverify/logger.rb
active_record_mysql_xverify-0.2.2 lib/active_record_mysql_xverify/logger.rb
active_record_mysql_xverify-0.2.1 lib/active_record_mysql_xverify/logger.rb
active_record_mysql_xverify-0.2.0 lib/active_record_mysql_xverify/logger.rb
active_record_mysql_xverify-0.1.1 lib/active_record_mysql_xverify/logger.rb