Index: trunk/ippScripts/scripts/magic_mask.pl
===================================================================
--- trunk/ippScripts/scripts/magic_mask.pl	(revision 18780)
+++ trunk/ippScripts/scripts/magic_mask.pl	(revision 18784)
@@ -29,14 +29,15 @@
 
 # Parse the command-line arguments
-my ($magic_id, $camera, $dbname, $outroot, $save_temps, $verbose, $no_update, $no_op);
+my ($magic_id, $camera, $dbname, $outroot, $save_temps, $verbose, $no_update, $no_op, $redirect);
 GetOptions(
-           'magic_id=s'    => \$magic_id,   # Magic identifier
-           'camera=s'      => \$camera,     # Camera name
-           'dbname=s'      => \$dbname,     # Database name
-           'outroot=s'     => \$outroot,    # Output root name
-           'save-temps'    => \$save_temps, # Save temporary files?
-           'verbose'       => \$verbose,    # Print stuff?
-           'no-update'     => \$no_update,  # Don't update the database?
-           'no-op'         => \$no_op,      # Don't do any operations?
+           'magic_id=s'      => \$magic_id,   # Magic identifier
+           'camera=s'        => \$camera,     # Camera name
+           'dbname=s'        => \$dbname,     # Database name
+           'outroot=s'       => \$outroot,    # Output root name
+           'save-temps'      => \$save_temps, # Save temporary files?
+           'verbose'         => \$verbose,    # Print stuff?
+           'no-update'       => \$no_update,  # Don't update the database?
+           'no-op'           => \$no_op,      # Don't do any operations?
+           'redirect-output' => \$redirect,   # Redirect output?
            ) or pod2usage( 2 );
 
@@ -50,4 +51,7 @@
 $ipprc->define_camera($camera);
 
+my $logDest = $ipprc->filename("LOG.EXP", $outroot, $magic_id) or
+    &my_die("Missing entry from camera config", $magic_id, $PS_EXIT_CONFIG_ERROR);
+$ipprc->redirect_output($logDest) if $redirect;
 
 # Look for programs we need
