summaryrefslogtreecommitdiff
path: root/python/qpid/session.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-03-11 14:29:17 +0000
committerRafael H. Schloming <rhs@apache.org>2008-03-11 14:29:17 +0000
commit5c70b29392ab7f7252d7923d98616794f6200eab (patch)
tree23caf5119ab5bc73530d4d3747ca56ce16838de4 /python/qpid/session.py
parentd38d509af075300441ad858b1bb7680ac6b8e5ca (diff)
downloadqpid-python-5c70b29392ab7f7252d7923d98616794f6200eab.tar.gz
added convenience API for turning on logging; added logging for controls and commands; made logging prettier
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@635939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/session.py')
-rw-r--r--python/qpid/session.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/qpid/session.py b/python/qpid/session.py
index 8374b8cd3d..4da6f883b4 100644
--- a/python/qpid/session.py
+++ b/python/qpid/session.py
@@ -28,6 +28,8 @@ from util import wait, notify
from exceptions import *
from logging import getLogger
+log = getLogger("qpid.io.cmd")
+
class SessionDetached(Exception): pass
def client(*args):
@@ -142,6 +144,8 @@ class Session(Invoker):
self.send(seg)
+ log.debug("SENT %s %s %s", seg.id, hdr, cmd)
+
if message != None:
if message.headers != None:
sc = StringCodec(self.spec)
@@ -175,7 +179,10 @@ class Session(Invoker):
def dispatch(self, assembly):
segments = assembly[:]
+
hdr, cmd = assembly.pop(0).decode(self.spec)
+ log.debug("RECV %s %s %s", cmd.id, hdr, cmd)
+
args = []
for st in cmd._type.segments:
@@ -291,7 +298,7 @@ class Delegate:
finally:
self.session.lock.release()
-msg = getLogger("qpid.ssn.msg")
+msg = getLogger("qpid.io.msg")
class Client(Delegate):
@@ -301,5 +308,5 @@ class Client(Delegate):
m.id = cmd.id
messages = self.session.incoming(cmd.destination)
messages.put(m)
- msg.debug("RECV: %s", m)
+ msg.debug("RECV %s", m)
return INCOMPLETE