[Opensrf-commits] r2144 - in trunk/src: libopensrf perl/lib/OpenSRF (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 21 09:58:37 EST 2011
Author: erickson
Date: 2011-01-21 09:58:35 -0500 (Fri, 21 Jan 2011)
New Revision: 2144
Modified:
trunk/src/libopensrf/osrf_application.c
trunk/src/perl/lib/OpenSRF/Application.pm
Log:
make the api CALL log line consistent across Perl and C and make it something that can be pasted directly into srfsh
Modified: trunk/src/libopensrf/osrf_application.c
===================================================================
--- trunk/src/libopensrf/osrf_application.c 2011-01-11 23:05:27 UTC (rev 2143)
+++ trunk/src/libopensrf/osrf_application.c 2011-01-21 14:58:35 UTC (rev 2144)
@@ -1035,8 +1035,10 @@
// Log the call, with the method and parameters
char* params_str = jsonObjectToJSON( ctx->params );
if( params_str ) {
- osrfLogInfo( OSRF_LOG_MARK, "CALL:\t%s %s - %s",
- ctx->session->remote_service, ctx->method->name, params_str );
+ // params_str will at minimum be "[]"
+ params_str[strlen(params_str) - 1] = '\0'; // drop the trailing ']'
+ osrfLogInfo( OSRF_LOG_MARK, "CALL: %s %s %s",
+ ctx->session->remote_service, ctx->method->name, params_str + 1);
free( params_str );
}
return 0;
Modified: trunk/src/perl/lib/OpenSRF/Application.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/Application.pm 2011-01-11 23:05:27 UTC (rev 2143)
+++ trunk/src/perl/lib/OpenSRF/Application.pm 2011-01-21 14:58:35 UTC (rev 2144)
@@ -127,7 +127,7 @@
my @p = $app_msg->params;
my $method_name = $app_msg->method;
my $method_proto = $session->last_message_api_level;
- $log->info("CALL: $method_name [". (@p ? join(', ', at p) : '') ."]");
+ $log->info("CALL: ".$session->service." $method_name ". (@p ? join(', ', at p) : ''));
my $coderef = $app->method_lookup( $method_name, $method_proto, 1, 1 );
More information about the opensrf-commits
mailing list