[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.2, Wed Jan 19 18:50:48 2005 UTC revision 1.3, Mon Jan 24 07:05:56 2005 UTC
# Line 24  Line 24 
24  C<< Trace($message) if T(errors => 4); >>  C<< Trace($message) if T(errors => 4); >>
25    
26  This statement will produce a trace message if the trace level is 4 or more and the C<errors>  This statement will produce a trace message if the trace level is 4 or more and the C<errors>
27  category is active. Note that the special category C<root> is always active, so  category is active. Note that the special category C<main> is always active, so
28    
29  C<< Trace($message) if T(root => 4); >>  C<< Trace($message) if T(main => 4); >>
30    
31  will trace if the trace level is 4 or more.  will trace if the trace level is 4 or more.
32    
# Line 62  Line 62 
62  # Declare the configuration variables.  # Declare the configuration variables.
63    
64  my $Destination = "NONE";       # Description of where to send the trace output.  my $Destination = "NONE";       # Description of where to send the trace output.
65  my %Categories = ( root => 1 );  my %Categories = ( main => 1 );
66                                                          # hash of active category names                                                          # hash of active category names
67  my $TraceLevel = 0;                     # trace level; a higher trace level produces more  my $TraceLevel = 0;                     # trace level; a higher trace level produces more
68                                                          # messages                                                          # messages
# Line 345  Line 345 
345                          # Here we have no category, so we need to get the calling package.                          # Here we have no category, so we need to get the calling package.
346                          $traceLevel = $category;                          $traceLevel = $category;
347                          my ($package, $fileName, $line) = caller;                          my ($package, $fileName, $line) = caller;
348                          # If there is no calling package, we default to "root".              # If there is no calling package, we default to "main".
349                          if (!$package) {                          if (!$package) {
350                                  $category = "root";                  $category = "main";
351                          } else {                          } else {
352                                  $category = $package;                                  $category = $package;
353                          }                          }

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3