added some debug logging
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 19 Mar 2008 17:13:48 +0000 (17:13 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 19 Mar 2008 17:13:48 +0000 (17:13 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1289 9efc2488-bf62-4759-914b-345cdb29e865

src/python/osrf/http_translator.py

index 795d316..74ba953 100644 (file)
@@ -212,6 +212,7 @@ class HTTPTranslator(object):
                 return False
             self.recipient = "%s@%s/%s" % \
                 (ROUTER_NAME, OSRF_DOMAIN, self.service)
                 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:
             return True
         else:
             if self.recipient:
@@ -227,6 +228,7 @@ class HTTPTranslator(object):
 
         
     def init_headers(self, net_msg):
 
         
     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:
         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 @@ class HTTPTranslator(object):
             @return False if there is no data to return to the caller 
             (dropped message, eg. timeout), True otherwise '''
 
             @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_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 "
 
             if code == OSRF_STATUS_TIMEOUT:
                 osrf.log.log_debug("removing cached session [%s] and "