[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.108, Wed Sep 3 20:33:22 2008 UTC revision 1.109, Tue Sep 23 15:33:54 2008 UTC
# Line 744  Line 744 
744      eval {      eval {
745          # Do we need to put this in the RSS feed?          # Do we need to put this in the RSS feed?
746          if ($FIG_Config::error_feed && ($Destination eq 'WARN' || $forceFeed)) {          if ($FIG_Config::error_feed && ($Destination eq 'WARN' || $forceFeed)) {
747              # Yes. We now need to compute the date, the link, and the title.              # Probably. We need to check first, however, to see if it's from an
748                # ignored IP. For non-CGI situations, we default the IP to the self-referent.
749                my $key = "127.0.0.1";
750                if (defined $SavedCGI) {
751                    # Get the IP address.
752                    $key = $ENV{HTTP_X_FORWARDED_FOR} || $ENV{REMOTE_ADDR};
753                }
754                # Is the IP address in the ignore list?
755                my $found = scalar(grep { $_ eq $key } @FIG_Config::error_ignore_ips);
756                if (! $found) {
757                    # No. We're good. We now need to compute the date, the link, and the title.
758              # First, the date, in a very specific format.              # First, the date, in a very specific format.
759              my $date = strftime("%a, %02e %b %H:%M:%S %Y ", localtime) .              my $date = strftime("%a, %02e %b %H:%M:%S %Y ", localtime) .
760                  (tz_local_offset() / 30);                  (tz_local_offset() / 30);
# Line 768  Line 778 
778              if (defined $SavedCGI) {              if (defined $SavedCGI) {
779                  # We're in a web service. The environment is the user's IP, and the link                  # We're in a web service. The environment is the user's IP, and the link
780                  # is the URL that got us here.                  # is the URL that got us here.
                 my $key = $ENV{HTTP_X_FORWARDED_FOR} || $ENV{REMOTE_ADDR};  
781                  $environment .= "Event Reported at IP address $key process $$.";                  $environment .= "Event Reported at IP address $key process $$.";
782                  my $url = $SavedCGI->self_url();                  my $url = $SavedCGI->self_url();
783                  # We need the user agent string and (if available) the referrer.                  # We need the user agent string and (if available) the referrer.
# Line 877  Line 886 
886                  close XMLOUT;                  close XMLOUT;
887              }              }
888          }          }
889            }
890      };      };
891      if ($@) {      if ($@) {
892          # If the feed failed, we need to know why. The error will be traced, but this method will not be involved          # If the feed failed, we need to know why. The error will be traced, but this method will not be involved

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.109

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3