new config settings
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 16 Feb 2005 17:17:42 +0000 (17:17 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 16 Feb 2005 17:17:42 +0000 (17:17 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@70 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Transport.pm
src/perlmods/OpenSRF/Utils/Logger.pm

index b1a8bbb..7cab41e 100644 (file)
@@ -3,10 +3,10 @@ use strict; use warnings;
 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
@@ -80,7 +80,7 @@ sub handler {
        $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();
@@ -121,7 +121,7 @@ sub handler {
                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;
        }
 
index 8ebf12b..502c8af 100644 (file)
@@ -122,17 +122,16 @@ my $known_logs = [
 
                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();
                }
 
@@ -145,10 +144,10 @@ my $known_logs = [
 
 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);
 }
 
 # ---------------------------------------------------------