From 293d7af290deb4d4d4a5cdb983ed30b383bb5a92 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 27 Jul 2006 21:30:38 +0000 Subject: [PATCH] logging all requests + params to activity log git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@752 9efc2488-bf62-4759-914b-345cdb29e865 --- src/gateway/osrf_json_gateway.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gateway/osrf_json_gateway.c b/src/gateway/osrf_json_gateway.c index 1829dcb..0bebfad 100644 --- a/src/gateway/osrf_json_gateway.c +++ b/src/gateway/osrf_json_gateway.c @@ -128,8 +128,17 @@ static int osrf_json_gateway_method_handler (request_rec *r) { } else { - osrfLogInfo( OSRF_LOG_MARK, "[%s] service=%s, method=%s", - r->connection->remote_ip, service, method ); + /* ----------------------------------------------------------------- */ + /* log all requests to the activity log */ + growing_buffer* act = buffer_init(128); + buffer_fadd(act, "[%s] %s:%s", r->connection->remote_ip, service, method ); + char* str; int i = 0; + while( (str = osrfStringArrayGetString(mparams, i++)) ) + buffer_fadd(act, " %s", str); + + osrfLogActivity( OSRF_LOG_MARK, act->buf ); + buffer_free(act); + /* ----------------------------------------------------------------- */ osrfAppSession* session = osrf_app_client_session_init(service); -- 2.11.0