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-1.1.2 lib/lockbox/log_subscriber.rb
lockbox-1.1.1 lib/lockbox/log_subscriber.rb
lockbox-1.1.0 lib/lockbox/log_subscriber.rb
lockbox-1.0.0 lib/lockbox/log_subscriber.rb
lockbox-0.6.8 lib/lockbox/log_subscriber.rb
lockbox-0.6.7 lib/lockbox/log_subscriber.rb
lockbox-0.6.6 lib/lockbox/log_subscriber.rb
lockbox-0.6.5 lib/lockbox/log_subscriber.rb
lockbox-0.6.4 lib/lockbox/log_subscriber.rb
lockbox-0.6.3 lib/lockbox/log_subscriber.rb
lockbox-0.6.2 lib/lockbox/log_subscriber.rb
lockbox-0.6.1 lib/lockbox/log_subscriber.rb
lockbox-0.6.0 lib/lockbox/log_subscriber.rb
lockbox-0.5.0 lib/lockbox/log_subscriber.rb
lockbox-0.4.9 lib/lockbox/log_subscriber.rb
lockbox-0.4.8 lib/lockbox/log_subscriber.rb
lockbox-0.4.7 lib/lockbox/log_subscriber.rb
lockbox-0.4.6 lib/lockbox/log_subscriber.rb
lockbox-0.4.5 lib/lockbox/log_subscriber.rb
lockbox-0.4.4 lib/lockbox/log_subscriber.rb