IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32379


Ignore:
Timestamp:
Sep 9, 2011, 11:05:10 AM (15 years ago)
Author:
bills
Message:

Use redirect_to_logfile

Location:
trunk/ippScripts/scripts
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/camera_exp.pl

    r31906 r32379  
    8888
    8989if ($redirect) {
    90     $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $cam_id, $PS_EXIT_SYS_ERROR );
     90    $ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $cam_id, $PS_EXIT_SYS_ERROR );
    9191    print "\n\n";
    9292    print "Starting script $0 on $host\n\n";
  • trunk/ippScripts/scripts/diff_skycell.pl

    r31941 r32379  
    4040my ($skycell_id, $diff_skyfile_id);
    4141my ($use_convolved);
    42 my $zaplog = 0;
    4342
    4443GetOptions(
     
    5756    'no-op'             => \$no_op, # Don't do any operations?
    5857    'redirect-output'   => \$redirect,
    59     'zaplog'            => \$zaplog, # delete any previous log file
    6058) or pod2usage( 2 );
    6159
     
    7977
    8078# XXX camera is not known here; cannot use filerules...
    81 # bills 2011-03-07 This is unfortunate because it prevents us from using prepare_output ...
    82 # my $logDest = $ipprc->filename("LOG.EXP", $outroot);
    8379my $logDest = "$outroot.log";
    8480if ($run_state eq 'update') {
    8581    $logDest .= '.update';
    86     # ... well we can just do the dirty work here
    87     $ipprc->kill_file($logDest);
    88 } elsif ($zaplog) {
    89     $ipprc->kill_file($logDest);
    90 }
    91 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR ) if $redirect;
     82}
     83$ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR ) if $redirect;
    9284
    9385my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_DIFF);
  • trunk/ippScripts/scripts/register_exp.pl

    r31043 r32379  
    5454
    5555my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $exp_id, $PS_EXIT_CONFIG_ERROR );
    56 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $exp_id, $PS_EXIT_SYS_ERROR ) if $logfile;
     56$ipprc->redirect_to_logfile($logfile) or my_die( "Unable to redirect output", $exp_id, $PS_EXIT_SYS_ERROR ) if $logfile;
    5757
    5858pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
  • trunk/ippScripts/scripts/register_imfile.pl

    r32298 r32379  
    6060
    6161my $ipprc = PS::IPP::Config->new() or my_die_for_add( "Unable to set up", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
    62 $ipprc->redirect_output($logfile) or my_die_for_add( "Unable to redirect output", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_SYS_ERROR ) if $logfile;
     62$ipprc->redirect_to_logfile($logfile) or my_die_for_add( "Unable to redirect output", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_SYS_ERROR ) if $logfile;
    6363
    6464pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
  • trunk/ippScripts/scripts/stack_skycell.pl

    r32371 r32379  
    104104}
    105105
    106 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $stack_id, $PS_EXIT_SYS_ERROR ) if $redirect;
     106$ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $stack_id, $PS_EXIT_SYS_ERROR ) if $redirect;
    107107
    108108my $neb;
  • trunk/ippScripts/scripts/warp_overlap.pl

    r27718 r32379  
    5757
    5858my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $warp_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
    59 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $warp_id, $PS_EXIT_SYS_ERROR ) if $logfile;
     59$ipprc->redirect_to_logfile($logfile) or my_die( "Unable to redirect output", $warp_id, $PS_EXIT_SYS_ERROR ) if $logfile;
    6060
    6161&my_die("Tessellation identifier not provided: $tess_dir", $warp_id, $PS_EXIT_SYS_ERROR) unless $tess_dir ne "NULL";
  • trunk/ippScripts/scripts/warp_skycell.pl

    r31941 r32379  
    3838
    3939my ($warp_id, $skycell_id, $warp_skyfile_id, $tess_dir, $reduction, $camera, $dbname, $outroot, $threads, $run_state, $magicked, $verbose, $no_update, $no_op, $redirect, $save_temps);
    40 my $zaplog = 0;
    4140
    4241GetOptions(
     
    5554    'no-update'           => \$no_update, # Don't update the database?
    5655    'no-op'               => \$no_op, # Don't do any operations?
    57     'zaplog'              => \$zaplog, # delete previous logfile
    5856    'redirect-output'     => \$redirect,
    5957    'save-temps'          => \$save_temps, # Save temporary files?
     
    7775my $do_stats;
    7876if ($run_state eq 'new') {
    79     $logDest = prepare_output("LOG.EXP", $outroot, $skycell_id, $zaplog);
     77    $logDest = $ipprc->filename("LOG.EXP", $outroot, $skycell_id);
    8078    $traceDest = prepare_output("TRACE.EXP", $outroot, $skycell_id, 1);
    8179    $do_stats = 1;
    8280} elsif ($run_state eq 'update')  {
    83     $logDest = prepare_output("LOG.EXP.UPDATE", $outroot, $skycell_id, 1);
     81    $logDest = $ipprc->filename("LOG.EXP.UPDATE", $outroot, $skycell_id);
    8482    $traceDest = prepare_output("TRACE.EXP.UPDATE", $outroot, $skycell_id, 1);
    8583} else {
     
    9391}
    9492
    95 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR ) if $redirect;
     93$ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR ) if $redirect;
    9694
    9795# Recipes to use based on reduction class
Note: See TracChangeset for help on using the changeset viewer.