X-Git-Url: http://git.equinoxoli.org/?p=opensrf-equinox.git;a=blobdiff_plain;f=src%2Fperl%2Flib%2FOpenSRF%2FApplication.pm;h=2ec87ce02e8f0901b8e64dbbbf2ed6e4f21af1a9;hp=5995f1cbc0c2c4c662287ae726f92fccc22b7601;hb=32c6058def9336eaf4f36da2930a147240392e9d;hpb=703809d19a3336ee975d39efc3372363f6268365 diff --git a/src/perl/lib/OpenSRF/Application.pm b/src/perl/lib/OpenSRF/Application.pm index 5995f1c..2ec87ce 100644 --- a/src/perl/lib/OpenSRF/Application.pm +++ b/src/perl/lib/OpenSRF/Application.pm @@ -184,9 +184,9 @@ sub handler { $appreq->max_bundle_count( $coderef->max_bundle_count ); $appreq->max_chunk_size( $coderef->max_chunk_size ); - $log->debug( "in_request = $in_request : [" . $appreq->threadTrace."]", INTERNAL ); + $log->debug(sub{return "in_request = $in_request : [" . $appreq->threadTrace."]" }, INTERNAL ); if( $in_request ) { - $log->debug( "Pushing onto pending requests: " . $appreq->threadTrace, DEBUG ); + $log->debug(sub{return "Pushing onto pending requests: " . $appreq->threadTrace }, DEBUG ); push @pending_requests, [ $appreq, \@args, $coderef ]; return 1; } @@ -263,7 +263,7 @@ sub handler { $in_request--; - $log->debug( "Pending Requests: " . scalar(@pending_requests), INTERNAL ); + $log->debug(sub{return "Pending Requests: " . scalar(@pending_requests) }, INTERNAL ); # cycle through queued requests while( my $aref = shift @pending_requests ) { @@ -303,11 +303,11 @@ sub handler { my $start = time; my $response = $aref->[2]->run( $aref->[0], @{$aref->[1]} ); my $time = sprintf '%.3f', time - $start; - $log->debug( "Method duration for [".$aref->[2]->api_name." -> ".join(', ',@{$aref->[1]}).']: '.$time, DEBUG ); + $log->debug(sub{return "Method duration for [".$aref->[2]->api_name." -> ".join(', ',@{$aref->[1]}).']: '.$time }, DEBUG ); $appreq = $aref->[0]; $appreq->respond_complete( $response ); - $log->debug( "Executed: " . $appreq->threadTrace, INTERNAL ); + $log->debug(sub{return "Executed: " . $appreq->threadTrace }, INTERNAL ); } catch Error with { my $e = shift; @@ -545,7 +545,7 @@ sub method_lookup { my $class = ref($self) || $self; $log->debug("Lookup of [$method] by [$class] in api_level [$proto]", DEBUG); - $log->debug("Available methods\n\t".join("\n\t", keys %{ $_METHODS[$proto] }), INTERNAL); + $log->debug(sub{return "Available methods\n\t".join("\n\t", keys %{ $_METHODS[$proto] }) }, INTERNAL); my $meth; if (__PACKAGE__->thunk) { @@ -646,11 +646,11 @@ sub run { } - $log->debug("Coderef for [$$self{package}::$$self{method}] has been run", DEBUG); + $log->debug(sub{return "Coderef for [$$self{package}::$$self{method}] has been run" }, DEBUG); if ( ref($req) and UNIVERSAL::isa($req, 'OpenSRF::AppSubrequest') and !$req->respond_directly ) { $req->respond($resp) if (defined $resp); - $log->debug("SubRequest object is responding with : " . join(" ",$req->responses), DEBUG); + $log->debug(sub{return "SubRequest object is responding with : " . join(" ",$req->responses) }, DEBUG); return $req->responses; } else { $log->debug("A top level Request object is responding $resp", DEBUG) if (defined $resp); @@ -681,7 +681,7 @@ sub run { $session->finish(); } - $log->debug( "Remote Subrequest Responses " . join(" ", $req->responses), INTERNAL ); + $log->debug(sub{return "Remote Subrequest Responses " . join(" ", $req->responses) }, INTERNAL ); return $req->responses; }