[Opensrf-commits] r1625 - branches/rel_1_0/src/gateway

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


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

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

Modified: branches/rel_1_0/src/gateway/osrf_http_translator.c
===================================================================
--- branches/rel_1_0/src/gateway/osrf_http_translator.c	2009-01-13 23:17:28 UTC (rev 1624)
+++ branches/rel_1_0/src/gateway/osrf_http_translator.c	2009-01-13 23:17:45 UTC (rev 1625)
@@ -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