added qw(:level) to CDBI.pm because we were getting empty log levels
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 1 Dec 2005 21:02:44 +0000 (21:02 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 1 Dec 2005 21:02:44 +0000 (21:02 +0000)
made log output a little more descriptive (more to do)

setting log service in math bench

slimmed the logging in the gateway

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@594 9efc2488-bf62-4759-914b-345cdb29e865

examples/math_bench.pl
src/gateway/mod_ils_gateway.c
src/perlmods/OpenSRF/Utils/Logger.pm

index 2d991f5..c3a504c 100755 (executable)
@@ -2,6 +2,8 @@
 use strict; use warnings;
 use OpenSRF::System;
 use Time::HiRes qw/time/;
+use OpenSRF::Utils::Logger;
+my $log = "OpenSRF::Utils::Logger";
 
 # Test script which runs queries agains the opensrf.math service and reports on
 # the average round trip time of the requests.
@@ -12,6 +14,7 @@ print "usage: $0 <num_requests>\n" and exit unless $count;
 
 # * connect to the Jabber network
 OpenSRF::System->bootstrap_client( config_file => "/openils/conf/bootstrap.conf" );
+$log->set_service('math_bench');
 
 # * create a new application session for the opensrf.math service
 my $session = OpenSRF::AppSession->create( "opensrf.math" );
index 1f5f8bd..28e1337 100644 (file)
@@ -176,9 +176,7 @@ static int mod_ils_gateway_method_handler (request_rec *r) {
 
        char* content = jsonObjectToJSON(response);
        if(content) {
-               osrfLogInfo( "----------------------------------------------\n"
-                       "Gateway responding with:\n%s\n"
-                       "----------------------------------------------", content );
+               osrfLogInfo( "Gateway responding with:  %s", content );
                ap_rputs(content,r);
                free(content);
        } 
index 6d71eb3..607b65d 100644 (file)
@@ -200,6 +200,8 @@ sub _log_message {
 
        #my( $pack, $file, $line_no ) = @caller;
 
+       $msg = "[$n:"."$$".":::] $msg";
+
        if( $level == ACTIVITY() ) {
                if( is_act_syslog() ) { syslog( $fac | $l, $msg ); } 
                elsif( is_act_filelog() ) { _write_file( $msg, 1 ); }