[Opensrf-commits] r1624 - trunk/src/gateway

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jan 13 18:17:33 EST 2009


Author: erickson
Date: 2009-01-13 18:17:28 -0500 (Tue, 13 Jan 2009)
New Revision: 1624

Modified:
   trunk/src/gateway/osrf_http_translator.c
Log:
like the old gateway, log the full request params as JSON

Modified: trunk/src/gateway/osrf_http_translator.c
===================================================================
--- trunk/src/gateway/osrf_http_translator.c	2009-01-13 22:58:29 UTC (rev 1623)
+++ trunk/src/gateway/osrf_http_translator.c	2009-01-13 23:17:28 UTC (rev 1624)
@@ -260,14 +260,17 @@
                 growing_buffer* act = buffer_init(128);	
                 buffer_fadd(act, "[%s] [%s] %s %s", trans->remoteHost, "", trans->service, msg->method_name);
 
+                jsonObject* obj = NULL;
+                int i = 0;
                 char* str; 
-                int i = 0;
-                while((str = jsonObjectGetString(jsonObjectGetIndex(params, i++)))) {
+                while((obj = jsonObjectGetIndex(params, i++))) {
+                    str = jsonObjectToJSON(obj);
                     if( i == 1 )
                         OSRF_BUFFER_ADD(act, " ");
                     else 
                         OSRF_BUFFER_ADD(act, ", ");
                     OSRF_BUFFER_ADD(act, str);
+                    free(str);
                 }
                 osrfLogActivity(OSRF_LOG_MARK, act->buf);
                 buffer_free(act);



More information about the opensrf-commits mailing list