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

raeburn raeburn@source.lon-capa.org
Wed, 24 Mar 2010 18:57:49 -0000


raeburn		Wed Mar 24 18:57:49 2010 EDT

  Modified files:              
    /loncom	loncron 
  Log:
  - Rotate autoupdate.log and refreshcourseids_db.log. 
  
  
Index: loncom/loncron
diff -u loncom/loncron:1.82 loncom/loncron:1.83
--- loncom/loncron:1.82	Thu Nov 26 00:18:09 2009
+++ loncom/loncron	Wed Mar 24 18:57:49 2010
@@ -2,7 +2,7 @@
 
 # Housekeeping program, started by cron, loncontrol and loncron.pl
 #
-# $Id: loncron,v 1.82 2009/11/26 00:18:09 raeburn Exp $
+# $Id: loncron,v 1.83 2010/03/24 18:57:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -564,12 +564,17 @@
 
 sub rotate_other_logs {
     my ($fh) = @_;
-    my $fname="$perlvar{'lonDaemons'}/logs/autoenroll.log";
-    &rotate_logfile($fname,$fh,'Auto Enroll log');
-    $fname="$perlvar{'lonDaemons'}/logs/autocreate.log";
-    &rotate_logfile($fname,$fh,'Create Course log');
-    $fname="$perlvar{'lonDaemons'}/logs/searchcat.log";
-    &rotate_logfile($fname,$fh,'Search Cataloguing log');
+    my %logs = (
+                  autoenroll          => 'Auto Enroll log',
+                  autocreate          => 'Create Course log',
+                  searchcat           => 'Search Cataloguing log',
+                  autoupdate          => 'Auto Update log',
+                  refreshcourseids_db => 'Refresh CourseIDs db log',
+               );
+    foreach my $item (keys(%logs)) {
+        my $fname=$perlvar{'lonDaemons'}.'/logs/'.$item.'.log';
+        &rotate_logfile($fname,$fh,$logs{$item});
+    }
 }
 
 # ----------------------------------------------------------------- Connections