Index: trunk/ippTasks/detrend.correct.pro
===================================================================
--- trunk/ippTasks/detrend.correct.pro	(revision 18041)
+++ trunk/ippTasks/detrend.correct.pro	(revision 18048)
@@ -5,7 +5,4 @@
 # test for required global variables
 check.globals
-
-$LOGSUBDIR = $LOGDIR/detrend
-exec mkdir -p $LOGSUBDIR
 
 book init detPendingCorrectedImfile
@@ -71,5 +68,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detcorr.imfile.log
+  stderr $LOGDIR/detcorr.load.log
 
   task.exec
@@ -146,18 +143,8 @@
     sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
 
-    $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
-    if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in detrend.correct.pro:150"
-      break
-    end
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-
-    # XXX I need to report the error if this fails...
-    mkdir $outpath
-
-    $run = detrend_correct_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA
+    stdout $LOGDIR/detcorr.run.log
+    stderr $LOGDIR/detcorr.run.log
+
+    $run = detrend_correct_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA --outroot $outroot --redirect-output
     if ("$WORKDIR" != "NULL")
       $run = $run --workdir $WORKDIR
@@ -202,5 +189,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detcorr.exp.log
+  stderr $LOGDIR/detcorr.exp.load.log
 
   task.exec
@@ -275,16 +262,9 @@
     sprintf outroot "%s/%s.%s.%s/%s/%s.detcorr.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
 
-    ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --touch --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
-    if ("$logfile" == "") 
-      $logfile = $outroot.log
-    end
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
-
-    $run = detrend_correct_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA
+    stdout $LOGDIR/detcorr.exp.run.log
+    stderr $LOGDIR/detcorr.exp.run.log
+
+    $run = detrend_correct_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --corr_id $CORR_ID --corr_type $CORR_TYPE --camera $CAMERA --redirect-output
+
     if ("$WORKDIR" != "NULL")
       $run = $run --workdir $WORKDIR
Index: trunk/ippTasks/detrend.norm.pro
===================================================================
--- trunk/ippTasks/detrend.norm.pro	(revision 18041)
+++ trunk/ippTasks/detrend.norm.pro	(revision 18048)
@@ -5,7 +5,4 @@
 # test for required global variables
 check.globals
-
-$LOGSUBDIR = $LOGDIR/detrend
-exec mkdir -p $LOGSUBDIR
 
 book init detPendingNormStatImfile
@@ -84,5 +81,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detrend.normstat.log
+  stderr $LOGDIR/detrend.normstat.load.log
 
   task.exec
@@ -199,5 +196,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detrend.norm.log
+  stderr $LOGDIR/detrend.norm.load.log
 
   task.exec
@@ -272,13 +269,8 @@
     sprintf outroot "%s/%s.%s.%s/%s.%s.norm.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION
 
-    ## generate output log
-    $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
-
-    $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --outroot $outroot
+    stdout $LOGDIR/detrend.norm.run.log
+    stderr $LOGDIR/detrend.norm.run.log
+
+    $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --outroot $outroot --redirect-output
     add_standard_args run
     
@@ -317,5 +309,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detrend.normexp.log
+  stderr $LOGDIR/detrend.normexp.load.log
 
   task.exec
Index: trunk/ippTasks/detrend.process.pro
===================================================================
--- trunk/ippTasks/detrend.process.pro	(revision 18041)
+++ trunk/ippTasks/detrend.process.pro	(revision 18048)
@@ -5,7 +5,4 @@
 # test for required global variables
 check.globals
-
-$LOGSUBDIR = $LOGDIR/detrend
-exec mkdir -p $LOGSUBDIR
 
 book init detPendingProcessedImfile
@@ -71,5 +68,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detproc.imfile.log
+  stderr $LOGDIR/detproc.imfile.load.log
 
   task.exec
@@ -152,6 +149,6 @@
     end
 
-    stdout $logfile
-    stderr $logfile
+    stdout $LOGDIR/detproc.imfile.run.log
+    stderr $LOGDIR/detproc.imfile.run.log
     dirname $logfile -var outpath
 
@@ -159,5 +156,5 @@
     mkdir $outpath
 
-    $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot
+    $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot --redirect-output
     if ("$REDUCTION" != "NULL")
       $run = $run --reduction $REDUCTION
@@ -199,5 +196,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detproc.exp.log
+  stderr $LOGDIR/detproc.exp.load.log
 
   task.exec
@@ -271,17 +268,8 @@
     sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID
 
-    ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --touch --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
-    if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in detrend.process.pro:282"
-      break
-    end
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
-
-    $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
+    stdout $LOGDIR/detproc.exp.run.log
+    stderr $LOGDIR/detproc.exp.run.log
+
+    $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output
     if ("$REDUCTION" != "NULL")
       $run = $run --reduction $REDUCTION
Index: trunk/ippTasks/detrend.resid.pro
===================================================================
--- trunk/ippTasks/detrend.resid.pro	(revision 18041)
+++ trunk/ippTasks/detrend.resid.pro	(revision 18048)
@@ -5,7 +5,4 @@
 # test for required global variables
 check.globals
-
-$LOGSUBDIR = $LOGDIR/detrend
-exec mkdir -p $LOGSUBDIR
 
 book init detPendingResidImfile
@@ -68,5 +65,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detresid.log
+  stderr $LOGDIR/detresid.load.log
 
   task.exec
@@ -145,17 +142,8 @@
     sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION
 
-    ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
-    if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in detrend.resid.pro:161"
-      break
-    end
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
-
-    $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --outroot $outroot
+    stdout $LOGDIR/detresid.run.log
+    stderr $LOGDIR/detresid.run.log
+
+    $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --outroot $outroot --redirect-output
     if ("$REDUCTION" != "NULL")
       $run = $run --reduction $REDUCTION
@@ -197,5 +185,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detresid.exp.log
+  stderr $LOGDIR/detresid.exp.load.log
 
   task.exec
@@ -271,17 +259,8 @@
     sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION
 
-    ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id NONE --basename $outroot`
-    if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in detrend.process.pro:285"
-      break
-    end
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
-
-    $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
+    stdout $LOGDIR/detresid.exp.run.log
+    stderr $LOGDIR/detresid.exp.run.log
+
+    $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output
     add_standard_args run
 
Index: trunk/ippTasks/detrend.stack.pro
===================================================================
--- trunk/ippTasks/detrend.stack.pro	(revision 18041)
+++ trunk/ippTasks/detrend.stack.pro	(revision 18048)
@@ -5,7 +5,4 @@
 # test for required global variables
 check.globals
-
-$LOGSUBDIR = $LOGDIR/detrend
-exec mkdir -p $LOGSUBDIR
 
 book init detPendingStackedImfile
@@ -53,5 +50,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/detstack.log
+  stderr $LOGDIR/detrend.stack.load.log
 
   task.exec
@@ -125,17 +122,8 @@
     sprintf outroot "%s/%s.%s.%s/%s.%s.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION
 
-    ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --touch --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
-    if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in detrend.stack.pro:141"
-      break
-    end
+    stdout $LOGDIR/detrend.stack.run.log
+    stderr $LOGDIR/detrend.stack.run.log
 
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
-
-    $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
+    $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output
     if ("$REDUCTION" != "NULL")
       $run = $run --reduction $REDUCTION
