Sha256: 0e17265ef12ef61153d3330fee076fefd951a3f4e67ba7fad4227df17d2c3c5d

Contents?: true

Size: 547 Bytes

Versions: 25

Compression:

Stored size: 547 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, 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, true)} Decrypted #{payload[:name]}"
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
lockbox-0.4.3 lib/lockbox/log_subscriber.rb
lockbox-0.4.2 lib/lockbox/log_subscriber.rb
lockbox-0.4.1 lib/lockbox/log_subscriber.rb
lockbox-0.4.0 lib/lockbox/log_subscriber.rb
lockbox-0.3.7 lib/lockbox/log_subscriber.rb