3 # Purpose: Log viewer program. Pass it parameters of the logs to view, or it will automatically view some.
4 # Authors: Joey Hess <joey@kitenet.net>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: Unknown (origin: see http://svn.kitenet.net/trunk/bin/logview)
7 # Latest change: Fri Sep 16 18:19:05 CEST 2005 [mika]
8 ################################################################################
15 # If I am root, look at all logs, otherwise only those that are
18 $perm='-perm +6' if $? != 0;
20 @logfiles=split /\n/, `find $logdir -type f -regex '.*.log' ! -name faillog ! -name lastlog $perm`;
21 push @logfiles, "$logdir/mail.err", "$logdir/mail.warn";
24 if (-e $ENV{HOME}."/.xsession-errors") {
25 push @logfiles, $ENV{HOME}."/.xsession-errors";
28 # Tail without wasting the last line of the screen.
29 open(TAIL, "tail -q --follow=name --retry -n 2 @logfiles|");
36 ## END OF FILE #################################################################