Index of /manual/software/flog/flog-0.01
flog(?)
flog(?) flog(?)
NAME
flog - real time log splitter and viewer
SYNOPSIS
flog -c=file [ -d[=file] ] [ -g=GID|group ] [ -u=UID|
user ]
DESCRIPTION
flog grew out of the desire to have apache httpd(8) dir-
ect log output to multiple files dependent upon various
parameters. While
CustomLog file-pipe format-or-nickname env=[!]environment-variable
is pretty nifty it's basically an if-then-else construct,
and I desired more of a switch-case one. Hence flog was
born.
OPTIONS
-c=file
Use configuration file
-d
-d=file
Open file in clobber mode for debug output. If
file is not specified /dev/tty8 is used instead.
-g=GID|group
flog will run as the group specified
NOT YET IMPLEMENTED
-u=UID|user
flog will run as the user specified
NOT YET IMPLEMENTED
CONFIGURATION
Configuration of flog is meant to be fairly straight for-
ward. The configuration file should contain at least a
global hash named FILES, and a sub named flog.
%FILES
The keys for %FILES are file descriptor names
which flog will automatically open for you.
The values for %FILES are anonymous arrays. The
first index is the file name to be associated
with the key/file handle. If the second index is
present and true, the file handle will be un-
buffered. See CAVEATS
sub flog
The subroutine called for each log entry which
contains the logic to determine where the entry
should be output to. It takes no arguments.
SIGNALS
flog will respond to various signals. Listed below are
those that have special meaning. Most other signals will
cause flog to die. See old-interface-signals in sig-
trap(3) for more.
HUP re-read configuration file.
USR1 flush buffers for all file handles. NOT YET IMPLEMENTED
USR2 (un)pause output (queueing input) useful for log
rotation etc. Pausing causes a flush. NOT YET IMPLEMENTED
CAVEATS
The -g and -u options only work if the current user is
allowed to setuid. This is typically root.
DEBUG is a reserved filehandle
From perlfaq5
In most stdio implementations, the type of output buffer-
ing and the size of the buffer varies according to the
type of device. Disk files are block buffered, often with
a buffer size of more than 2k.
BUGS
None known. What section for the manual?
TODO
Build in log rotation, or support external rotation by
flushing then pausing output during rotation.
SEE ALSO
httpd(8), PERL(1).
Documentation on Apache log file-pipe configuration is
available from
http://www.apache.org/docs/mod/mod_log_config.html#transferlog
Bug reports to: webmaster@pthbb.org