Ignore:
Timestamp:
Jul 31, 2011, 12:32:31 AM (12 years ago)
Author:
achernya
Message:
Merge r1878-r1937 from trunk to branches/fc15-dev
Location:
branches/fc15-dev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/fc15-dev

  • branches/fc15-dev/server/common/oursrc/logview/logview.pl

    r189 r1938  
    11#!/usr/bin/perl -T -w
    22
    3 %ENV = ();
    4 $ENV{'PATH'} = '/bin:/usr/bin';
    53my $elogsrc = '/home/logview/error_log';
    64# get by uid the caller's name to find the corresponding locker name
    7 my $caller = (getpwuid $<)[0];
    8 $\ = "\n";
     5my ($caller, $home) = (getpwuid($<))[0, 7];
     6my $search = "$home/";
    97
    10 print "--- Error logs for $caller ---";
    11 open FOO, $elogsrc;
     8print "--- Error logs for $caller ---\n";
     9open FOO, '<', $elogsrc or die $!;
    1210while (<FOO>) {
    13     # Prevent deviousness, like web_scripts directories within web_scripts
    14     if (m|/afs/athena.mit.edu/| &&
    15         m|/([^/]+)/web_scripts/| && $caller eq $1) {
    16         print;
    17     }
     11    print if index($_, $search) != -1;
    1812}
Note: See TracChangeset for help on using the changeset viewer.