source: trunk/server/common/oursrc/logview/logview.pl @ 1890

Last change on this file since 1890 was 1890, checked in by quentin, 11 years ago
Allow logview usage for sipb-cell lockers
  • Property svn:executable set to *
File size: 490 bytes
Line 
1#!/usr/bin/perl -T -w
2
3%ENV = ();
4$ENV{'PATH'} = '/bin:/usr/bin';
5my $elogsrc = '/home/logview/error_log';
6# get by uid the caller's name to find the corresponding locker name
7my $caller = (getpwuid $<)[0];
8$\ = "\n";
9
10print "--- Error logs for $caller ---";
11open FOO, $elogsrc;
12while (<FOO>) {
13    # Prevent deviousness, like web_scripts directories within web_scripts
14    if (m(/afs/(?:athena|sipb).mit.edu/) &&
15        m(/([^/]+)/web_scripts/) && $caller eq $1) {
16        print;
17    }
18}
Note: See TracBrowser for help on using the repository browser.