[LON-CAPA-cvs] cvs: loncom / loncnew

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 25 May 2004 15:32:13 -0000


albertel		Tue May 25 11:32:13 2004 EDT

  Modified files:              
    /loncom	loncnew 
  Log:
  - don't always log Connection status, only when debugging
  
  
Index: loncom/loncnew
diff -u loncom/loncnew:1.45 loncom/loncnew:1.46
--- loncom/loncnew:1.45	Tue May 11 15:55:35 2004
+++ loncom/loncnew	Tue May 25 11:32:13 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # lonc maintains the connections to remote computers
 #
-# $Id: loncnew,v 1.45 2004/05/11 19:55:35 albertel Exp $
+# $Id: loncnew,v 1.46 2004/05/25 15:32:13 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1416,6 +1416,7 @@
 We also use this to reset the retries count in order to allow the
 client to retry connections with a previously dead server.
 =cut
+
 sub ChildStatus {
     my $event = shift;
     my $watcher = $event->w;
@@ -1428,16 +1429,18 @@
     #
     #  Write out information about each of the connections:
     #
-    print $fh "Active connection statuses: \n";
-    my $i = 1;
-    print STDERR  "================================= Socket Status Dump:\n";
-    foreach my $item (keys %ActiveConnections) {
-	my $Socket = $ActiveConnections{$item}->data;
-	my $state  = $Socket->GetState();
-	print $fh "Connection $i State: $state\n";
-	print STDERR "---------------------- Connection $i \n";
-	$Socket->Dump();
-	$i++;	
+    if ($DebugLevel > 2) {
+	print $fh "Active connection statuses: \n";
+	my $i = 1;
+	print STDERR  "================================= Socket Status Dump:\n";
+	foreach my $item (keys %ActiveConnections) {
+	    my $Socket = $ActiveConnections{$item}->data;
+	    my $state  = $Socket->GetState();
+	    print $fh "Connection $i State: $state\n";
+	    print STDERR "---------------------- Connection $i \n";
+	    $Socket->Dump();
+	    $i++;	
+	}
     }
     $ConnectionRetriesLeft = $ConnectionRetries;
 }