1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
.TH clog 1 2013-09-10 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
clog \- colorized log tail
.SH SYNOPSIS
.B clog [\-h|\-\-help] [\-v|\-\-version] [\-d|\-\-date] [\-t|\-\-time] [\-f|\-\-file <rc>] [ <section> ... ]
.SH DESCRIPTION
Clog is a filter command, which means it copies its input to its output. But if
lines in the input match certain patterns, actions are taken. These are called
rules.
The rules are defined in ~/.clogrc as regular expressions, and the actions
are specified, to colorize either the line or matching pattern, or perhaps to
suppress the line.
If \-\-date is specified, the current date, in the form YYYY-MM-DD is prepended
to all lines.
If \-\-time is specified, the current time, in the form HH:MM:SS is prepended to
all lines.
If \-\-file is specified, an alternate configuration rc file may be specified.
Default is to ~/.clogrc
One or more section arguments may be specified. If none are provided, 'default'
is assumed. A section corresponds to a rule set defined in ~/.clogrc. and
allows the use of one .clogrc file to serve multiple different uses of clog.
If more than one section is specified, the rules sets are combined, in the
sequence found.
.SH CONFIGURATION FILE AND OVERRIDE OPTIONS
Clog reads its configuration from a file in the user's home directory:
~/.clogrc.
The format of the rules is:
.RS
<section> rule /<pattern>/ --> <color> <action>
.br
<section> rule "<pattern>" --> <color> <action>
.RE
If the pattern is surrounded by / characters, it is interpreted as a regular
expression. If the pattern is surrounded by " characters, it is interpreted as
a string fragment.
The section is simply a way to allow multiple rules sets, so that one .clogrc
file can serve multiple uses. The pattern may be any supported Standard C
Library regular expression. Action must be one of 'line', 'match', 'suppress'
or 'blank'.
Note that there is a default section, called 'default'. Putting rules in the
default section means that no section need be specified on the command line.
Any color can be used, in both the 16- and 256-color space. Some examples are:
.RS
bold
.br
underline
.br
bold blue
.br
underline on green
.br
black on white
.br
bold red on bright white
.br
rgb200 on grey4
.RE
Instead of coloring the whole line, specifying 'match' instead will only color
the parts of the line that match.
.SH EXAMPLE Rulesets
Here is an example ~/.clogrc file.
.RS
# Standard syslog entries.
.br
default rule /warn|debug/ --> yellow line
.br
default rule /error|severe/ --> red line
.br
default rule /critical/ --> bold red line
.br
default rule /critical/ --> blank
.br
default rule /ignore/ --> suppress
.br
.br
# Apache access.log status codes
.br
apache rule / 2[0-9][0-9] / --> green match
.br
apache rule / 3[0-9][0-9] / --> yellow match
.br
apache rule / 4[0-9][0-9] / --> red match
.br
apache rule / 5[0-9][0-9] / --> bold red match
.RE
.SH "CREDITS & COPYRIGHTS"
Copyright (C) 2006 \- 2013 P. Beckingham, F. Hernandez.
.br
Copyright (C) 2006 \- 2013 Goteborg Bit Factory.
Clog is distributed under the MIT license. See
http://www.opensource.org/licenses/mit-license.php for more information.
.SH SEE ALSO
For more information, see:
.TP
The official site at
<http://tasktools.org/projects/clog>
.TP
You can contact the project by writing an email to
<support@tasktools.org>
.SH REPORTING BUGS
.TP
Bugs in clog may be reported to <support@tasktools.org>
|