[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.103, Fri May 9 04:21:45 2008 UTC revision 1.104, Fri May 9 06:22:49 2008 UTC
# Line 208  Line 208 
208  my $SetupCount = 0;         # number of times TSetup called  my $SetupCount = 0;         # number of times TSetup called
209  my $AllTrace = 0;           # TRUE if we are tracing all categories.  my $AllTrace = 0;           # TRUE if we are tracing all categories.
210  my $SavedCGI;               # CGI object passed to ETracing  my $SavedCGI;               # CGI object passed to ETracing
211    my $CommandLine;            # Command line passed to StandardSetup
212  umask 2;                    # Fix the damn umask so everything is group-writable.  umask 2;                    # Fix the damn umask so everything is group-writable.
213    
214  =head2 Tracing Methods  =head2 Tracing Methods
# Line 745  Line 746 
746                  # No CGI object, so we're a command-line tool. Use the tracing                  # No CGI object, so we're a command-line tool. Use the tracing
747                  # key and the PID as the user identifier, and add the command.                  # key and the PID as the user identifier, and add the command.
748                  my $key = EmergencyKey();                  my $key = EmergencyKey();
749                  $environment .= "Event Reported by $key Process $$. Command $ENV{_}.";                  $environment .= "Event Reported by $key Process $$.";
750                    if ($CommandLine) {
751                        # We're in a StandardSetup script, so we have the real command line.
752                        $environment .= "\n<pre>" . CGI::escapeHTML($CommandLine) . "</pre>\n";
753                    } elsif ($ENV{_}) {
754                        # We're in a BASH script, so the command has been stored in the _ variable.
755                        $environment .= "  Command = " . CGI::escapeHTML($ENV{_}) . "\n";
756                    }
757              }              }
758              # Build a GUID. We use the current time, the title, and the process ID,              # Build a GUID. We use the current time, the title, and the process ID,
759              # then digest the result.              # then digest the result.
# Line 1745  Line 1753 
1753      my ($categories, $options, $parmHelp, @argv) = @_;      my ($categories, $options, $parmHelp, @argv) = @_;
1754      # Get the default tracing key.      # Get the default tracing key.
1755      my $tkey = EmergencyKey();      my $tkey = EmergencyKey();
1756        # Save the command line.
1757        $CommandLine = join(" ", $0, map { $_ =~ /\s/ ? "\"$_\"" : $_ } @argv);
1758      # Add the tracing options.      # Add the tracing options.
1759      if (! exists $options->{trace}) {      if (! exists $options->{trace}) {
1760          $options->{trace} = ['2', "tracing level (E for emergency tracing)"];          $options->{trace} = ['2', "tracing level (E for emergency tracing)"];

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.104

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3