Index: /branches/pap_mops/ippScripts/scripts/publish_file.pl
===================================================================
--- /branches/pap_mops/ippScripts/scripts/publish_file.pl	(revision 24503)
+++ /branches/pap_mops/ippScripts/scripts/publish_file.pl	(revision 24504)
@@ -40,5 +40,5 @@
 # Parse the command-line arguments
 my ( $pub_id, $camera, $stage, $stage_id, $format, $product, $workdir );
-my ( $dbname, $verbose, $no_update, $save_temps );
+my ( $dbname, $verbose, $no_update, $save_temps, $redirect );
 
 GetOptions(
@@ -53,4 +53,5 @@
     'no-update'         => \$no_update, # Don't update the database?
     'save-temps'        => \$save_temps, # Save temporary files?
+    'redirect-output'   => \$redirect,   # Redirect output to log file?
     ) or pod2usage( 2 );
 
@@ -71,4 +72,6 @@
 
 $ipprc->outroot_prepare( $outroot );
+my $logDest = "$outroot.log";
+$ipprc->redirect_output($logDest) or &my_die( "Unable to redirect output", $pub_id, $PS_EXIT_SYS_ERROR ) if $redirect;
 
 my $mdcParser = PS::IPP::Metadata::Config->new;
