logtail
Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 07 September 2024
Index
Return to Main Contents
NAME
logtail - tail a log file out of a list of defined logfiles
SYNOPSIS
edrc/bin/logtail
[
-h
]
logtail
[
select
]
logtail
[
-t
] [
-c
|
-C
] [
select
]
AVAILABILITY
WA2L/edrc
DESCRIPTION
give a selection of common logfiles to be tailed
(tail -f
selected_logfile).
The files to be listed in the selection list can be
defined in a user dependent or system wide configuration file.
The config file can list logfiles using the wild cards as known
from the
ls(1)
command. The list is resolved prior to each start of
logtail
and only the files that exist on the system and are readable
by the user are listed in the
selection list.
This enables the user to have an identical
configuration file for all servers and operating systems.
To load a log file into a viewer
(view),
instead of the continuous file output of
logtail,
use the
logview(1)
command.
OPTIONS
- -t
-
add a high resolution timestamp to the output allowing
timing information display on logfiles without timestamps.
- -c
-
colorize
tailed
output based on
logcheckd.pattern(4)
files.
- -C
-
prepend
[LEVEL]
to the colorizes
tailed
output based on
logcheckd.pattern(4)
files.
- select
-
select files from logfile list.
ENVIRONMENT
- $APPROOT
-
root directory of the application as resolved by
approot(3).
This variable can be used in the log files
configuration files to point to the root of the
WA2L/edrc installation. Therefore for example the
~edrc/var/log/edrc.log
definition can be replaced with
$APPROOT/var/log/edrc.log
with the result that
logview
also lists the logfile when no
edrc
user is defined on the system.
- $LOGTAIL_LEVELMODE
-
set the appearance of the
[LEVEL]
effective when using the
-C option.
Possible settings are:
light,
bold,
invers,
red,
green,
magenta,
blue,
cyan
and
yellow,
whereas the default is
bold.
EXIT STATUS
- 0
-
no error.
FILES
- $HOME/.log_files
-
definition of files to be listed in the selection. Only
the root user should list the files in this config file.
- $HOME/.mylog_files
-
definition of files to be listed in the selection.
For non-root users, this file should be used to define the
log files instead of
.log_files
due to the preservation of
.my*
files when using the
mkuser(3)
and/or
makeuser(3)
commands.
- etc/log_files.cfg
-
system wide definition of log files. This file is read
when the files
$HOME/.log_files
and
$HOME/.mylog_files
do not exist.
- etc/lgcheckd.cfg
-
configuration file of
lgcheckd(1m)
to resolve the pattern file for a selected log file.
- etc/logcheckd.cfg
-
configuration file of
logcheckd(1m)
to resolve the pattern file for a selected log file.
This file is read, if the
etc/lgcheckd.cfg
does not exist.
- var/logcheckd/pattern/
-
pattern files.
- var/logcheckd/pattern/logtail
-
default pattern file, if no pattern file could
be resolved.
EXAMPLES
- 1) common usage
-
Configuration file example:
#
# log_files.cfg - configuration file for logtail and logview
#
# [00] 08.08.2004 CWa Initial Version
#
$APPROOT/var/log/edrc.log
$APPROOT/var/log/pack.log
$APPROOT/var/log/patchinstall.log
$APPROOT/var/log/filedist.log
$APPROOT/var/log/rcmd.log
$APPROOT/var/log/sysconfig.log
$APPROOT/var/log/shttpd_*.log
/etc/cmcluster/*/*.log
/etc/shutdownlog
~ACME/log/sap_instance.log
/opt/patrol/log/*.log
/var/adm/cron/log
/var/log/boot.log
/var/log/cron
/var/log/cups/access_log
/var/log/cups/error_log
/var/log/dmesg
/var/log/httpd/*
/var/log/lastlog
/var/log/maillog
/var/log/messages
/var/adm/messages
/var/log/samba/log.nmbd
Example usage:
[ /home/barney ]
[ barney@acme001 ][bash]: logtail
1) /opt/edrc/var/log/edrc.log
2) /opt/edrc/var/log/pack.log
3) /opt/edrc/var/log/patchinstall.log
4) /opt/edrc/var/log/sysconfig.log
5) /opt/ACME/log/sap_instance.log
6) /var/log/boot.log
7) /var/log/cron
8) /var/log/dmesg
9) /var/log/httpd/access_log
10) /var/log/httpd/access_log.1
11) /var/log/httpd/access_log.2
12) /var/log/httpd/access_log.3
13) /var/log/httpd/access_log.4
14) /var/log/httpd/error_log
15) /var/log/httpd/error_log.1
:
41) /var/opt/ACME/log/useradm.log
42) /var/opt/ACME/log/watchdog.log
43) /var/opt/samba/log.smb.rh7mzv7t001
select log:6
logtail-INFO: tail -f /var/log/cron
Jan 14 14:01:00 rh7mzv7t001 CROND[27550]: (root) CMD (run-parts /etc/cron.hourly)
Jan 14 15:01:00 rh7mzv7t001 CROND[27913]: (root) CMD (run-parts /etc/cron.hourly)
Jan 14 16:01:00 rh7mzv7t001 CROND[28276]: (root) CMD (run-parts /etc/cron.hourly)
Jan 14 18:01:00 rh7mzv7t001 CROND[29478]: (root) CMD (run-parts /etc/cron.hourly)
SEE ALSO
edrcintro(1),
logcheckd.pattern(4),
lgcheckd.cfg(4),
logcheckd.cfg(4),
logview(1),
log_files.cfg(4),
tail(1),
tpl(1)
NOTES
-
BUGS
-
AUTHOR
logtail was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2021
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 17:23:16 GMT, September 24, 2024