Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 19396)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 19545)
@@ -28,5 +28,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($stack_id, $dbname, $outroot, $debug, $threads, $verbose, $no_update, $no_op, $save_temps);
+my ($stack_id, $dbname, $outroot, $debug, $threads, $verbose, $no_update, $no_op, $redirect, $save_temps);
 GetOptions(
     'stack_id|d=s'      => \$stack_id, # Stack identifier
@@ -38,4 +38,5 @@
     'no-update'         => \$no_update, # Don't update the database?
     'no-op'             => \$no_op, # Don't do any operations?
+    'redirect-output'   => \$redirect,
     'save-temps'        => \$save_temps, # Save temporary files?
 ) or pod2usage( 2 );
@@ -47,4 +48,10 @@
           ) unless defined $stack_id
     and defined $outroot;
+
+# XXX camera is not known here; cannot use filerules...
+# my $logDest = $ipprc->filename("LOG.EXP", $outroot);
+
+my $logDest = "$outroot.log";
+$ipprc->redirect_output($logDest) if $redirect;
 
 my $STATS =
@@ -97,5 +104,5 @@
 my $camera;                     # Camera
 foreach my $file (@$files) {
-    # skip warps which are speicified as 'ignored'
+    # skip warps which are specified as 'ignored'
     if ($file->{ignored}) { next; }
     if (defined $tess_id) {
@@ -166,5 +173,4 @@
 my $outputStats = $ipprc->filename("SKYCELL.STATS", $outroot);
 my $traceDest = $ipprc->filename("TRACE.EXP", $outroot);
-my $logDest = $ipprc->filename("LOG.EXP", $outroot);
 my $configuration = $ipprc->filename("PPSTACK.CONFIG", $outroot);
 
