lwatch(1)
β¨ NAME β¨
okay so bestie, this is the lwatch manual page β section 1 of the General Commands Manual, the girlies' favorite corner of the docs π
β and here's the whole vibe in one line:
lwatch β syntax highlighting for syslog/syslog-ng file
that's it. that's the girl. colorizing your logs, no cap.
π SYNOPSIS π
lwatch [-C filename] [--config filename] [-i filename] [--input
filename] [-o filename] [--output filename] [-sdOhv] [--show-
unparsed] [--daemon] [--omit-rc] [--help]
yes she's short. yes she's powerful. the way that a tiny synopsis is doing the absolute most π
π¦ DESCRIPTION π¦
Lwatch is a log colorizer, periodt. It reads syslog/syslog-ng data from a named fifo or from stdin, and it displays colored logs into stdout. literally just β¨aesthetic logsβ¨.
Lwatch is highly user-customizable β she's giving main character who lets you pick her outfits. It reads configuration data from the file /etc/lwatch.conf or (if given) from the file provided with option -C.
The way it works is simple, fr fr. It reads a line from input (the built-in default is /var/lib/syslog.fifo), then splits it into four parts:
- date
- hostname
- service name (with PID, if available)
- real message
Each part has its own default color, and you can redefine them in the configuration file. Default colors are the same as in loco(1) [see: http://www.zjuul.net/~jules/loco/]. π
But lwatch is not only a static log colorizer β she's something more, and I'm obsessed. It can colorize your logs any way you wish. You are able to set a new color for any part (date, host, service, message) using regexp based patterns. iykyk. π₯
π COMMAND LINE OPTIONS π
Lwatch accepts some command line options. Command line options have precedence over values from the configuration file β the CLI is the one who decides, no discussion, periodt.
-Cfilename,--configfilename β read config from filename instead of/etc/lwatch.confπ-ifilename,--inputfilename β read data from named fifo filename instead of/var/lib/syslog.fifoπΈ-ofilename,--outputfilename β write colored logs to filename instead of stdout π-s,--show-unparsedβ show unparsed lines likelast message repeated 5 timesor--- MARK ---π-d,--daemonβ run as daemon, detach from control terminal, move to background π§-O,--omit-rcβ do not read values from config file π-h,--helpβ show help about runtime option π«Ά-v,--versionβ show version and copyright notices β
(yes, -sdOhv is them all bundled up in the synopsis, she's compact like that π)
π RUNNING π
Preferred way to run lwatch is to read syslog messages from named fifo or from standard input.
If you use syslog you really want to read messages from a named fifo. To do it, put a line:
*.* |/var/lib/syslog.fifo
in your syslog.conf. Create the appropriate fifo and restart syslog, then run lwatch. You can also run lwatch before starting syslog β she's flexible like that πββοΈ. If you don't know how to create a named fifo, see mknod(1) for details.
Remember, bestie (this is the important part, don't skip it π€):
- fifo must exist
- proper name must be put in
/etc/lwatch.confor given with the-icommand line option
In syslog-ng you can run lwatch directly from syslog, i.e.:
log { source(src); destination(console_all);};
destination console_all {program("/usr/bin/lwatch -i- -o/dev/tty11"); };
π¨ real talk: Lwatch does not support reading from regular files.
If you really need this functionality, use the following command:
tail -f /path/to/filename | /usr/bin/lwatch -i-
It could be subject to change in the future. so watch this space π (or don't, she said "could", not "will" π)
π RESOURCES π
go give her a look, she deserves it π
π COPYRIGHT π
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the University of Cambridge, England. This library is available at: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
so iconic of them honestly π
π NOTE FROM AUTHOR π
I have written this tool for my own needs because perl tools, however flexible, ate a lot of memory and CPU. I have found it useful and I share it with the Open Source Community. But still, developing of this software is driven by my own needs. So, you could expect next release in a year or two ;)
It would be really nice if you could find some time and spare it for rating this project on FreshMeat (see RESOURCES). Comments are welcome too. I cannot promise that I will add new features to lwatch immediately but any positive feedback will raise my motivation level up.
Thank you in advance for your time. π«Ά
(not the author promising a new release "in a year or two" β king of setting expectations lowkey low, we respect it ππ)
π SEE ALSO π
and that's the whole page, bestie π you made it to the end of the lwatch(1) manual β section 1, General Commands Manual β with your girl lwatch closing out the page right where she started. go colorize something pretty. mwah πβ¨
π¦ where this page comes from
- ubuntu jammy: lwatch 0.6.2-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms