[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.3, Mon Jan 24 07:05:56 2005 UTC revision 1.4, Thu Jan 27 00:32:17 2005 UTC
# Line 52  Line 52 
52  the page output, they can be gathered together and displayed at the end of the page. This makes  the page output, they can be gathered together and displayed at the end of the page. This makes
53  it easier to debug page formatting problems.  it easier to debug page formatting problems.
54    
55    Finally, you can specify that all trace messages be emitted as warnings.
56    
57  The flexibility of tracing makes it superior to simple use of directives like C<die> and C<warn>.  The flexibility of tracing makes it superior to simple use of directives like C<die> and C<warn>.
58  Tracer calls can be left in the code with minimal overhead and then turned on only when needed.  Tracer calls can be left in the code with minimal overhead and then turned on only when needed.
59  Thus, debugging information is available and easily retrieved even when the application is  Thus, debugging information is available and easily retrieved even when the application is
# Line 89  Line 91 
91  The destination for the trace output. To send the trace output to a file, specify the file  The destination for the trace output. To send the trace output to a file, specify the file
92  name preceded by a ">" symbol. If a double symbol is used (">>"), then the data is appended  name preceded by a ">" symbol. If a double symbol is used (">>"), then the data is appended
93  to the file. Otherwise the file is cleared before tracing begins. In addition to sending  to the file. Otherwise the file is cleared before tracing begins. In addition to sending
94  the trace messages to a file, you can specify XX special destinations. C<HTML> will  the trace messages to a file, you can specify a special destination. C<HTML> will
95  cause tracing to the standard output with each line formatted as an HTML paragraph. C<TEXT>  cause tracing to the standard output with each line formatted as an HTML paragraph. C<TEXT>
96  will cause tracing to the standard output as ordinary text. C<QUEUE> will cause trace messages  will cause tracing to the standard output as ordinary text. C<QUEUE> will cause trace messages
97  to be stored in a queue for later retrieval by the L</QTrace> method. C<NONE> will cause  to be stored in a queue for later retrieval by the L</QTrace> method. C<WARN> will cause
98    trace messages to be emitted as warnings using the B<warn> directive.  C<NONE> will cause
99  tracing to be suppressed.  tracing to be suppressed.
100    
101  =back  =back
# Line 296  Line 299 
299                  # Convert the message to HTML and write it to the standard output.                  # Convert the message to HTML and write it to the standard output.
300                  my $escapedMessage = CGI::escapeHTML($message);                  my $escapedMessage = CGI::escapeHTML($message);
301                  print "<p>$timeStamp $message</p>\n";                  print "<p>$timeStamp $message</p>\n";
302        } elsif ($Destination eq "WARN") {
303           # Emit the message as a warning.
304           warn $message;
305          } elsif ($Destination =~ m/^>>/) {          } elsif ($Destination =~ m/^>>/) {
306                  # Write the trace message to an output file.                  # Write the trace message to an output file.
307                  open TRACING, $Destination;                  open TRACING, $Destination;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3