From 300c5c63eac7bee750b40efac4f2c3b878f20702 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Thu, 12 Nov 2009 00:39:31 +0800 Subject: [PATCH] color coded uncacheable statements to stand out in the log better. formatted to conform with typical rails logging --- lib/cash/query/abstract.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cash/query/abstract.rb b/lib/cash/query/abstract.rb index 41def65..2dd7411 100644 --- a/lib/cash/query/abstract.rb +++ b/lib/cash/query/abstract.rb @@ -28,7 +28,7 @@ def perform(find_options = {}, get_options = {}) misses, missed_keys, objects = hit_or_miss(cache_keys, index, get_options) format_results(cache_keys, choose_deserialized_objects_if_possible(missed_keys, cache_keys, misses, objects)) else - logger.debug("---- UNCACHEABLE #{table_name} - #{find_options.inspect} - #{get_options.inspect} - #{@options1.inspect} - #{@options2.inspect}") if logger + logger.debug(" \e[1;4;31mUNCACHEABLE\e[0m #{table_name} - #{find_options.inspect} - #{get_options.inspect} - #{@options1.inspect} - #{@options2.inspect}") if logger uncacheable end end