New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing logger accessor attributes #198
Comments
Happy to accept a pull request! |
AFAICT redis-rb doesn't implement logger accessors -
- I assume you're just asking for the ability to log redis commands as they're executed? eg:
I started to implement it in mock-redis here: jdelStrother@2ba1a14 - though it's kind of tricky to do it cleanly. Redis has the advantage of pushing all commands through the
which would be fixable by refactoring hget into public & private parts - eg: def hget(key, field)
_hget(key, field)
end
def hmget(key, *fields)
fields.flatten.map { |f| _hget(key, f) }
end
private
def _hget(key, field)
with_hash_at(key) { |h| h[field.to_s] }
end since only the public methods are logged, but that's starting to sound like a lot of tedious work. Any suggestions on a better implementation? |
Actually scratch all that, jdelStrother@dde6209 seems a much saner approach. I'll submit a PR for proper review. |
Implemented in #211. |
Code that uses
redis.logger
orredis.logger = other_logger
fails when usingMockRedis
. The emulation should include these attributes.The text was updated successfully, but these errors were encountered: