use base 'OpenSRF';
use OpenSRF::DOM;
use OpenSRF::AppSession;
-use OpenSRF::Utils::Config;
use OpenSRF::Utils::Logger qw(:level);
use OpenSRF::DomainObject::oilsResponse qw/:status/;
use OpenSRF::EX qw/:try/;
+use OpenSRF::Transport::SlimJabber::MessageWrapper;
#------------------
# --- These must be implemented by all Transport subclasses
$logger->transport( "Transport handler() received $data", INTERNAL );
# pass data to the message envelope
- my $helper = $class->message_envelope->new( $data );
+ my $helper = OpenSRF::Transport::SlimJabber::MessageWrapper->new( $data );
# Extract message information
my $remote_id = $helper->get_remote_id();
my $res = OpenSRF::DomainObject::oilsXMLParseError->new( status => "XML Parse Error --- $body" );
$app_session->status($res);
- $app_session->kill_me;
+ #$app_session->kill_me;
return 1;
}
if( defined($config) ) {
- $global_llevel = $config->system->debug;
- $port = $config->system->log_port;
- $proto = $config->system->log_proto;
- $peer = $config->system->log_server;
- $remote_logging = $config->system->remote_log;
+ $global_llevel = $config->bootstrap->debug;
+ $port = "";
+ $proto = "";
+ $peer = "";
+ $remote_logging = 0;
{
no strict "refs";
$global_llevel = &{$global_llevel};
}
- #$trace_active = $config->system->trace;
build_file_hash();
}
sub build_file_hash {
$file_hash = {};
- # XXX This breaks Config encapsulation and should be cleaned.
- foreach my $log ( grep { !($_ =~ /__id/) } (keys %{$config->logs}) ) {
- $file_hash->{$log} = $config->logs->$log;
- }
+ my $path = $config->bootstrap->log_dir;
+ $file_hash->{"error"} = join("/",$path,$config->logs->error);
+ $file_hash->{"transport"} = join("/",$path,$config->logs->transport);
+ $file_hash->{"debug"} = join("/",$path,$config->logs->debug);
}
# ---------------------------------------------------------