Sha256: a1593bfd973c87beb5654e9b12d51bbbfea4eed0b868631431e59191c2e0c01a

Contents?: true

Size: 517 Bytes

Versions: 5

Compression:

Stored size: 517 Bytes

Contents

module Toy
  module Logger
    extend ActiveSupport::Concern

    module ClassMethods
      def logger
        Toy.logger
      end

      def log_operation(operation, model, adapter, key, value)
        logger.debug("ToyStore #{operation} #{model} :#{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

5 entries across 5 versions & 1 rubygems

Version Path
toystore-0.6.6 lib/toy/logger.rb
toystore-0.6.5 lib/toy/logger.rb
toystore-0.6.4 lib/toy/logger.rb
toystore-0.6.3 lib/toy/logger.rb
toystore-0.6.2 lib/toy/logger.rb