NAME¶
console-log.conf - Main configuration file for console-log
DESCRIPTION¶
console-log keeps logfile pagers open on virtual consoles. /etc/console-log.conf
is the configuration file controlling which log file is opened on which tty.
Empty lines and lines starting with "#" are ignored.
The rest of the file consists of stanzas consisting of lines formed as a single
keyword and multiple values. Each stanza describes one pager being started.
Stanzas are separated with blank lines. Other keywords preceded by $ are
interpolated if the other keyword is set in the same stanza _before_ the
current line.
- tty
- is the number of the tty the log pager should be started
on. Choose a tty that has a virtual console. This is a mandatory
setting.
- chvt
- If chvt is yes, the system's console will be switched to
the tty of this stanza on startup. Default is no.
- file
- is a list of absolute paths to log files to display. The
first file that is either a plain file or a symlink is displayed. The file
name must not contain any spaces. This is a mandatory setting.
- user, group
- If user and/or group is/are given, uid/gid will be changed
to the given values before invoking the log pager. User needs to be in
group in /etc/group. If no user is given, the pager will be run as the
default user/group set at compile time.
- maxfilesize
- If the file to be paged exceeds the configured size, no
pager is started to avoid memory overflow. Value given in bytes. Default
is 7000000. Additionally, ulimit -v is set to twice this value.
- locscript
- is the absolute path to a bash shell script that will be
sourced before the pager is being started. The script will receive the
file path as a parameter and can set environment variables that can
influence the pager.
- pager
- is the actual program that will be invoked to display the
file. Use $file in the position of the file name. Default is less $file,
invoked with secure settings and follow mode acticvted. If you want to use
a different pager, you need to manually adapt
/usr/share/console-log/logpage. Please submit patches that extend
logpager's support for other pagers via the BTS.
EXAMPLE¶
The default config file
tty 9
chvt yes
file /var/log/syslog
group adm
tty 8
file /var/log/exim4/mainlog /var/log/exim/mainlog /var/log/mail.log
group adm
will start one log pager for the first file found from /var/log/exim4/mainlog,
/var/log/exim/mainlog and /var/log/mail.log, and one log pager for
/var/log/syslog, and will chvt to tty9.
If a file cannot be read by the user specified in the config file, the init
script will complain. You can either change the log file permissions or put
the user account in the appropriate group. For example, if
/var/log/exim/mainlog is only readable by group mail, you can either change
the log file group to adm (make sure to adapt the log file creation/rotation
process as well), run the pager as a user that can access the log file, or
else put the user account into group mail. Making the file readable for the
default account is the preferred way to solve this issue since it introduces
the least security risk.
FILES¶
/etc/console-log.conf
BUGS¶
Many. Be prepared to debug.
AUTHOR¶
This manpage was written by Marc Haber for console-log in Debian/GNU Operating
System.
SEE ALSO¶
/etc/init.d/console-log