[Opensrf-commits] r1289 - trunk/src/python/osrf

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 19 13:48:08 EDT 2008


Author: erickson
Date: 2008-03-19 13:13:48 -0400 (Wed, 19 Mar 2008)
New Revision: 1289

Modified:
   trunk/src/python/osrf/http_translator.py
Log:
added some debug logging

Modified: trunk/src/python/osrf/http_translator.py
===================================================================
--- trunk/src/python/osrf/http_translator.py	2008-03-19 15:25:38 UTC (rev 1288)
+++ trunk/src/python/osrf/http_translator.py	2008-03-19 17:13:48 UTC (rev 1289)
@@ -212,6 +212,7 @@
                 return False
             self.recipient = "%s@%s/%s" % \
                 (ROUTER_NAME, OSRF_DOMAIN, self.service)
+            osrf.log.log_debug("set service to %s" % self.recipient)
             return True
         else:
             if self.recipient:
@@ -227,6 +228,7 @@
 
         
     def init_headers(self, net_msg):
+        osrf.log.log_debug("initializing request headers")
         self.apreq.headers_out[OSRF_HTTP_HEADER_FROM] = net_msg.sender
         self.apreq.headers_out[OSRF_HTTP_HEADER_THREAD] = self.thread
         if self.multipart:
@@ -250,11 +252,13 @@
             @return False if there is no data to return to the caller 
             (dropped message, eg. timeout), True otherwise '''
 
+        osrf.log.log_debug('checking status...')
         osrf_msgs = osrf.json.to_object(net_msg.body)
         last_msg = osrf_msgs.pop()
 
         if last_msg.type() == OSRF_MESSAGE_TYPE_STATUS:
             code = int(last_msg.payload().statusCode())
+            osrf.log.log_debug("got a status message with code %d" % code)
 
             if code == OSRF_STATUS_TIMEOUT:
                 osrf.log.log_debug("removing cached session [%s] and "



More information about the opensrf-commits mailing list