Sha256: a4cc3a33286a10f6ae7a8b1cf2f9775bcdecd8bc6fc49916569489b74dd61dd9

Contents?: true

Size: 501 Bytes

Versions: 3

Compression:

Stored size: 501 Bytes

Contents

module Toy
  module Logger
    extend ActiveSupport::Concern

    module ClassMethods
      def logger
        Toy.logger
      end

      def log_operation(operation, adapter, key, value)
        logger.debug("ToyStore #{operation} :#{adapter.name} #{key.inspect}")
        logger.debug("  #{value.inspect}")
      end
    end

    module InstanceMethods
      def logger
        Toy.logger
      end

      def log_operation(*args)
        self.class.log_operation(*args)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
toystore-0.6.1 lib/toy/logger.rb
toystore-0.6 lib/toy/logger.rb
toystore-0.5 lib/toy/logger.rb