Sha256: 30a89c457487097ae16c137954dffb1c62ebb825f109e504586a91be79c61573

Contents?: true

Size: 542 Bytes

Versions: 3

Compression:

Stored size: 542 Bytes

Contents

module KmsEncrypted
  class LogSubscriber < ActiveSupport::LogSubscriber
    def decrypt_data_key(event)
      return unless logger.debug?

      name = "Decrypt Data Key (#{event.duration.round(1)}ms)"
      debug "  #{color(name, YELLOW, true)}  Context: #{event.payload[:context].inspect}"
    end

    def generate_data_key(event)
      return unless logger.debug?

      name = "Generate Data Key (#{event.duration.round(1)}ms)"
      debug "  #{color(name, YELLOW, true)}  Context: #{event.payload[:context].inspect}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kms_encrypted-0.3.0 lib/kms_encrypted/log_subscriber.rb
kms_encrypted-0.2.0 lib/kms_encrypted/log_subscriber.rb
kms_encrypted-0.1.4 lib/kms_encrypted/log_subscriber.rb