logtool(1)
π logtool(1) β the General Commands Manual page, but make it a group chat π
okay bestie, welcome to logtool, section 1 of the General Commands Manual (the LOCAL one, we'll get to that). buckle up π
β¨ NAME β¨
logtool β parse and filter syslog files. that's it. that's the whole job. and she ATE π
πΈ SYNOPSIS πΈ
(stdout) | logtool -[args]
so here's the tea, bestie: logtool is a command line program that takes your logfiles and turns them into something actually palatable, because raw syslog is giving "unreadable wall of text" and we are NOT doing that today π
she'll take literally anything that looks even vaguely like a syslog file or a multilog file, and also just straight-up unformatted ASCII, and crunch it all into one of these formats for your viewing pleasure:
- ANSI β colorized, for easy "at a glance" viewing π
- ASCII β for e-mail reports and terminals that don't do color
- CSV β for spreadsheet and database imports
- HTML β for generating web pages π
- RAW β for no good reason π (their words, not mine)
π¦ OPTIONS π¦
-o [ ANSI | ASCII | CSV | HTML | RAW ]β lets you pick your output format, one of: ANSI (this is the default), ASCII, CSV, HTML, RAW. and listen, the options are not case sensitive, so-o CSVand-o csvshould yield the same results. we love an unbothered queen β¨-t [ long | short ]β pick how time gets displayed. your choices: (Long, the default)Mon Dy HH:MM:SS, or (Short)HH:MM. pick your fighter π-bβ makeslogtoolbeep on RED events. ANSI output only, so don't come crying to me if you're in CSV and nothing goes beep π this one is genuinely useful when you wanna monitor a logfile on an ongoing basis and you want your terminal to beep whenever something out of the ordinary happens. it's giving "alarm but make it cute."-sβ tellslogtoolto not display the syslog "source" field.-pβ tellslogtoolto not display the "program" field.-c [/path/config.file]β lets you specify a config file other than the default, which is/etc/logtool/logtool.conf.-i [/path/includefile]β lets you specify an alternate file containing regex's for inclusion. default is/etc/logtool/include.-e [/path/excludefile]β lets you specify an alternate file containing regex's for exclusion. default is/etc/logtool/exclude.-nβ makeslogtoolskip any attempts to resolve IP β Hostname by the various modules. lowkey a lifesaver when your DNS is temporarily down, bestie π«Ά-vβ setlogtoolto operate in verbose mode. (does nothing currently π iconic behavior honestly)-Vβ causeslogtoolto print its version information and exit.-hβ display the help message. when in doubt,-hit out π
π₯ SUGGESTED USAGE(S) π₯
as a 'live' logfile monitoring tool:
tail -f /var/log/messages | logtool -o ANSI -b
to generate colorized webpages of logfiles:
cat /var/log/messages | logtool -o HTML >
/home/httpd/html/logs/messages.html
to generate reports via a cronjob:
retail /var/log/messages | logtool -o ASCII | mail -s "Daily
report" someuser@somedomain.ext
(and yes, that third one says retail. I am simply the messenger, bestie. copy it exactly, no cap π
)
π CONFIG FILE π
/etc/logtool/logtool.conf
the config file should be commented to the point of being self-documenting, so we are not gonna comment very extensively on it here. suffice to say, this is THE place where you should configure 99% of your runtime options for logtool β¨
you may also have a collection of different default configurations, and select amongst them by the '-c' option of logtool. build-a-config workshop, we love to see it π
β AVAILABILITY β
Logtool is known to compile and run on all UNIX flavors using a 2.95.x GNU C Compiler, the GNU Make utility, and a proper ANSI C library (glibc is recommended, but not required).
specific reports of success include FreeBSD, OpenBSD, Solaris, SunOS, AIX, SCO, and of course, any known flavor of Linux (including at least 2 embedded system variants). she's everywhere. she's universal. she's the moment ππ
π SEE ALSO π
regex(7)β for help with constructing regular expressions for the include/exclude/colors files. if you find no regex manual on your system, try'apropos regex'and see what you get, or as a last ditch,'man grep'should at least point you in the right direction π§- you can also find a somewhat better bit of documentation in the textfile
'logtool.txt'(usually in the/usr/doc/,/usr/share/doc/or similar tree on most Linux distributions). if you don't know where to look, you can probably find it by typing'locate logtool.txt'at the command line π
π«Ά AUTHOR π«Ά
A.L.Lambert <al@xjack.org>
and that's the page, bestie!! π before you go β this whole thing lives in the LOCAL corner of the logtool(1) manual, so when you're citing her, that's the source and the section, periodt. now go pipe something into her and watch the colors do their thing. slay πΈπ¦β¨
π¦ where this page comes from
- debian bookworm: logtool 1.2.8-11
- debian trixie: logtool 1.2.8-14
- ubuntu jammy: logtool 1.2.8-11
- ubuntu noble: logtool 1.2.8-13
- ubuntu questing: logtool 1.2.8-14.1
- ubuntu resolute: logtool 1.2.8-14.1build1
- ubuntu stonking: logtool 1.2.8-14.1build1
- Copyright (C) 2001 A.L.Lambert. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms