like the old gateway, log the full request params as JSON
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 13 Jan 2009 23:17:28 +0000 (23:17 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 13 Jan 2009 23:17:28 +0000 (23:17 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1624 9efc2488-bf62-4759-914b-345cdb29e865

src/gateway/osrf_http_translator.c

index 9d278b3..dc41070 100644 (file)
@@ -260,14 +260,17 @@ static int osrfHttpTranslatorParseRequest(osrfHttpTranslator* trans) {
                 growing_buffer* act = buffer_init(128);        
                 buffer_fadd(act, "[%s] [%s] %s %s", trans->remoteHost, "", trans->service, msg->method_name);
 
-                char* str; 
+                jsonObject* obj = NULL;
                 int i = 0;
-                while((str = jsonObjectGetString(jsonObjectGetIndex(params, i++)))) {
+                char* str; 
+                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);