if ( my $thingy = $class->find($sess_id) ) {
$thingy->remote_id( $remote_id );
- $logger->debug( "AppSession returning existing session $sess_id", DEBUG );
return $thingy;
- } else {
- $logger->debug( "AppSession building new server session $sess_id", DEBUG );
}
if( $service eq "client" ) {
my @doc = ();
- $logger->debug( "In send2", INTERNAL );
-
my $disconnect = 0;
my $connecting = 0;
if($self->stateless && $self->state != CONNECTED) {
$self->reset;
- $logger->debug("AppSession is stateless in send", DEBUG );
+ $logger->debug("AppSession is stateless in send", INTERNAL );
}
if( !$self->stateless and $self->state != CONNECTED ) {
sub queue_wait {
my $self = shift;
- OpenSRF::Utils::Logger->debug( "Calling queue_wait(@_)", INTERNAL );
return $self->session->queue_wait(@_)
}
return 1; # error?
}
- $log->debug( "In Application::handler()", DEBUG );
-
my $app = $self->application_implementation;
- if( $app ) {
- $log->debug( "Application is $app", DEBUG);
- }
-
if ($session->last_message_type eq 'REQUEST') {
- $log->debug( "We got a REQUEST: ". $app_msg->method);
my $method_name = $app_msg->method;
- $log->debug( " * Looking up $method_name inside $app", DEBUG);
-
my $method_proto = $session->last_message_api_level;
- $log->debug( " * Method API Level [$method_proto]", DEBUG);
my $coderef = $app->method_lookup( $method_name, $method_proto, 1, 1 );
return 1;
}
- $log->debug( " (we got coderef $coderef", DEBUG);
-
unless ($session->continue_request) {
$session->status(
OpenSRF::DomainObject::oilsConnectStatus->new(
my @args = $app_msg->params;
my $appreq = OpenSRF::AppRequest->new( $session );
- $log->debug( "in_request = $in_request : [" . $appreq->threadTrace."]", DEBUG );
+ $log->debug( "in_request = $in_request : [" . $appreq->threadTrace."]", INTERNAL );
if( $in_request ) {
$log->debug( "Pushing onto pending requests: " . $appreq->threadTrace, DEBUG );
push @pending_requests, [ $appreq, \@args, $coderef ];
statusCode => STATUS_COMPLETE(),
status => 'Request Complete' ) );
}
- $log->debug( "Executed: " . $appreq->threadTrace, DEBUG );
+ $log->debug( "Executed: " . $appreq->threadTrace, INTERNAL );
} catch Error with {
my $e = shift;
if(UNIVERSAL::isa($e,"Error")) {
}
if (defined $meth) {
- $log->debug("Looks like we found [$method]!", DEBUG);
- $log->debug("Method object is ".Dumper($meth), INTERNAL);
if($no_remote and $meth->{remote}) {
$log->debug("OH CRAP We're not supposed to return remote methods", WARN);
return undef;
}
if (!$self->{remote}) {
- my $code ||= \&{$self->{package} . '::' . $self->{method}};
- $log->debug("Created coderef [$code] for $$self{package}::$$self{method}",DEBUG);
+ my $code = \&{$self->{package} . '::' . $self->{method}};
my $err = undef;
try {
$resp = $code->($self, $req, @params);
} catch Error with {
- my $e = shift;
- $err = $e;
- warn "Method 'run' catching error: $e\n";
+ $err = shift;
if( ref($self) eq 'HASH') {
- $log->error("Sub $$self{package}::$$self{method} DIED!!!\n\t$e\n", ERROR);
+ $log->error("Sub $$self{package}::$$self{method} DIED!!!\n\t$err\n", ERROR);
}
};
if($err) {
if(UNIVERSAL::isa($err,"Error")) {
- warn "Throwing from method run:\n$err\n------------------\n";
throw $err;
} else {
die $err->stringify;
$log->debug("Coderef for [$$self{package}::$$self{method}] has been run", DEBUG);
if ( ref($req) and UNIVERSAL::isa($req, 'OpenSRF::AppSubrequest') ) {
- $log->debug("A SubRequest object is responding", DEBUG);
$req->respond($resp) if (defined $resp);
- $log->debug("... Responding with : " . join(" ",$req->responses), DEBUG);
+ $log->debug("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);
$log->debug(" Received api_level => [$api_level], MType => [$mtype], ".
"from [".$session->remote_id."], threadTrace[".$self->threadTrace."]");
- $log->debug("endpoint => [".$session->endpoint."]", DEBUG);
- $log->debug("OpenSRF::AppSession->SERVER => [".$session->SERVER()."]", DEBUG);
-
my $val;
if ( $session->endpoint == $session->SERVER() ) {
}
if( $val ) {
- $log->debug("Passing request up to OpenSRF::Application", DEBUG);
return OpenSRF::Application->handler($session, $self->payload);
} else {
$log->debug("Request was handled internally", DEBUG);
if ($session->state == $session->CONNECTING()) {
if($mtype ne "CONNECT" and $session->stateless) {
- $log->debug("Got message Stateless", DEBUG);
return 1; #pass the message up the stack
}