[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39, Fri Feb 24 19:45:29 2006 UTC revision 1.41, Wed Mar 15 21:59:29 2006 UTC
# Line 374  Line 374 
374      # Get the parameters.      # Get the parameters.
375      my ($categories, $options, $parmHelp, @argv) = @_;      my ($categories, $options, $parmHelp, @argv) = @_;
376      # Add the tracing options.      # Add the tracing options.
377        if (! exists $options->{trace}) {
378      $options->{trace} = [2, "tracing level"];      $options->{trace} = [2, "tracing level"];
379        }
380      $options->{sql} = [0, "turn on SQL tracing"];      $options->{sql} = [0, "turn on SQL tracing"];
381      $options->{h} = [0, "display command-line options"];      $options->{h} = [0, "display command-line options"];
382      $options->{user} = [$$, "trace log file name suffix"];      $options->{user} = [$$, "trace log file name suffix"];
# Line 403  Line 405 
405      # Next, we create the category string by prefixing the trace level      # Next, we create the category string by prefixing the trace level
406      # and joining the categories.      # and joining the categories.
407      my $cats = join(" ", $parseOptions{trace}, @cats);      my $cats = join(" ", $parseOptions{trace}, @cats);
408      # Now set up the tracing.      # Verify that we can open a file in the temporary directory.
409        my $traceMode = "TEXT";
410      my $suffix = $retOptions->{user};      my $suffix = $retOptions->{user};
411      TSetup($cats, "+>$FIG_Config::temp/trace$suffix.log");      my $traceFileName = "$FIG_Config::temp/trace$suffix.log";
412        if (open TESTTRACE, ">$traceFileName") {
413            $traceMode = "+>$traceFileName";
414            close TESTTRACE;
415        }
416        # Now set up the tracing.
417        TSetup($cats, $traceMode);
418      # Check for the "h" option. If it is specified, dump the command-line      # Check for the "h" option. If it is specified, dump the command-line
419      # options and exit the program.      # options and exit the program.
420      if ($retOptions->{h}) {      if ($retOptions->{h}) {

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.41

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3