Sha256: b402c446e6e7cb5f22e648ed0870200720ef1f1fb0083ed72d5c6b43ed334442

Contents?: true

Size: 559 Bytes

Versions: 8

Compression:

Stored size: 559 Bytes

Contents

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

      payload = event.payload
      name = "Encrypt File (#{event.duration.round(1)}ms)"

      debug "  #{color(name, YELLOW, bold: true)} Encrypted #{payload[:name]}"
    end

    def decrypt_file(event)
      return unless logger.debug?

      payload = event.payload
      name = "Decrypt File (#{event.duration.round(1)}ms)"

      debug "  #{color(name, YELLOW, bold: true)} Decrypted #{payload[:name]}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lockbox-2.0.0 lib/lockbox/log_subscriber.rb
lockbox-1.4.1 lib/lockbox/log_subscriber.rb
lockbox-1.4.0 lib/lockbox/log_subscriber.rb
lockbox-1.3.3 lib/lockbox/log_subscriber.rb
lockbox-1.3.2 lib/lockbox/log_subscriber.rb
lockbox-1.3.1 lib/lockbox/log_subscriber.rb
lockbox-1.3.0 lib/lockbox/log_subscriber.rb
lockbox-1.2.0 lib/lockbox/log_subscriber.rb