Sha256: 975a9d5b8c77726a9344cc10b5674d4711c16c9551feef1c5aefdff2fee728db

Contents?: true

Size: 722 Bytes

Versions: 7

Compression:

Stored size: 722 Bytes

Contents

module Startback
  module Caching
    class Logger
      include Support::Robustness

      def cache_hit(entity_cache, context, pkey, cached)
        log(:debug, entity_cache, "cache_hit", context, op_data: pkey)
      end

      def cache_outdated(entity_cache, context, pkey, cached)
        log(:info, entity_cache, "cache_outdated", context, op_data: pkey)
      end

      def cache_miss(entity_cache, context, pkey)
        log(:info, entity_cache, "cache_miss", context, op_data: pkey)
      end

      def cache_fail(entity_cache, context, pkey, ex)
        log(:error, entity_cache, "cache_fail", context, op_data: pkey, error: ex)
      end

    end # class Logger
  end # module Caching
end # module Startback

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
startback-1.1.0 lib/startback/caching/logger.rb
startback-1.0.3 lib/startback/caching/logger.rb
startback-1.0.2 lib/startback/caching/logger.rb
startback-1.0.1 lib/startback/caching/logger.rb
startback-1.0.0 lib/startback/caching/logger.rb
startback-0.19.4 lib/startback/caching/logger.rb
startback-0.19.3 lib/startback/caching/logger.rb