Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 18360)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 18562)
@@ -27,19 +27,20 @@
 
 my ( $exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $verbose, $no_update,
-     $no_op, $save_temps );
+     $no_op, $redirect, $save_temps );
 GetOptions(
-           'exp_tag=s'          => \$exp_tag, # Exposure identifier
-           'cam_id=s'          => \$cam_id, # Camtool identifier
-           'recipe=s'          => \$recipe, # Recipe to use
-           'camera|c=s'        => \$camera, # Camera
-           'dbname|d=s'        => \$dbname, # Database name
-           'outroot|w=s'       => \$outroot, # output file base name
-           'reduction=s'       => \$reduction, # Reduction class
-           'dvodb|w=s'         => \$dvodb,  # output DVO database
-           'verbose'           => \$verbose,   # Print to stdout
-           'no-update'         => \$no_update, # Update the database?
-           'no-op'             => \$no_op, # Don't do any operations?
-           'save-temps'        => \$save_temps, # Save temporary files?
-           ) or pod2usage( 2 );
+    'exp_tag=s'          => \$exp_tag, # Exposure identifier
+    'cam_id=s'          => \$cam_id, # Camtool identifier
+    'recipe=s'          => \$recipe, # Recipe to use
+    'camera|c=s'        => \$camera, # Camera
+    'dbname|d=s'        => \$dbname, # Database name
+    'outroot|w=s'       => \$outroot, # output file base name
+    'reduction=s'       => \$reduction, # Reduction class
+    'dvodb|w=s'         => \$dvodb,  # output DVO database
+    'verbose'           => \$verbose,   # Print to stdout
+    'no-update'         => \$no_update, # 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 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
@@ -54,4 +55,8 @@
 
 $ipprc->define_camera($camera);
+
+my $logDest = $ipprc->filename("LOG.EXP", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
+
+$ipprc->redirect_output($logDest) if $redirect;
 
 # Recipes to use based on reduction class
@@ -185,5 +190,4 @@
 my $fpaStats   = $ipprc->filename("PSASTRO.STATS",      $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
 my $traceDest  = $ipprc->filename("TRACE.EXP",          $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
-my $logDest    = $ipprc->filename("LOG.EXP",            $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
 
 # convert supplied DVO database name to UNIX filename
@@ -320,5 +324,9 @@
     carp($msg);
     if (defined $cam_id and not $no_update) {
-        my $command = "$camtool -addprocessedexp -cam_id $cam_id -uri UNKNOWN -code $exit_code";
+        my $command = "$camtool -addprocessedexp";
+	$command .= " -cam_id $cam_id";
+	$command .= " -uri UNKNOWN";
+	$command .= " -code $exit_code";
+	$command .= " -path_base $outroot";
         $command .= " -hostname $host" if defined $host;
         $command .= " -dbname $dbname" if defined $dbname;
