summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorWill Maier <willmaier@ml1.net>2011-01-06 13:01:11 -0600
committerWill Maier <willmaier@ml1.net>2011-01-06 13:01:11 -0600
commit40ca9c27c2136bd0b4c85fa5fb012b3cd87e974a (patch)
tree1dfa7bbf21061883d3958290c255d2bf6c94d919 /redis/client.py
parentf90768d412e0a0eda54d2ecd9a92fef78f1d331d (diff)
downloadredis-py-40ca9c27c2136bd0b4c85fa5fb012b3cd87e974a.tar.gz
log connects/disconnects
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index 89b97aa..b02716e 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -58,6 +58,7 @@ class Connection(object):
"Connects to the Redis server if not already connected"
if self._sock:
return
+ log.debug("connecting to %s:%d/%d", self.host, self.port, self.db)
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(self.socket_timeout)
@@ -81,6 +82,7 @@ class Connection(object):
"Disconnects from the Redis server"
if self._sock is None:
return
+ log.debug("disconnecting from %s:%d/%d", self.host, self.port, self.db)
try:
self._sock.close()
except socket.error: