Skip to content
Browse files

Merge pull request #269 from ryanlchan/activesupport-logger-compatabi…

…lity

Add logger accessors to DalliStore instance
  • Loading branch information...
2 parents 44c68de + 2ea6e49 commit 18700e2977dc5dae385729cdc5ed6cacf2d4a789 @mperham mperham committed
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/active_support/cache/dalli_store.rb
View
12 lib/active_support/cache/dalli_store.rb
@@ -186,6 +186,14 @@ def reset
@data.reset
end
+ def logger
+ Dalli.logger
+ end
+
+ def logger=(new_logger)
+ Dalli.logger = new_logger
+ end
+
protected
# Read an entry from the cache.
@@ -264,10 +272,6 @@ def log(operation, key, options=nil)
logger.debug("Cache #{operation}: #{key}#{options.blank? ? "" : " (#{options.inspect})"}")
end
- def logger
- Dalli.logger
- end
-
end
end
end

0 comments on commit 18700e2

Please sign in to comment.
Something went wrong with that request. Please try again.