Skip to content

Commit 4fb8a52

Browse files
author
raszi
committed
Initial revision
git-svn-id: https://svn.ssh.hu/svn/colorize/trunk@2 2bf76031-112b-435f-9534-88410ef3bb9f
1 parent 7f02a19 commit 4fb8a52

File tree

12 files changed

+1179
-0
lines changed

12 files changed

+1179
-0
lines changed

README

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ABOUT:
2+
This is a short (no, it's not short anymore :) perl script to colorize'
3+
your logs. You can use your own colors, you can simply modify your config
4+
file in your home directory, or system-wide (/etc/colorize). Some colors
5+
are shit, 'cause i start the script on my sisters' mono vga monitor. If
6+
you have a good "theme", i please you, to send me, and i will put into
7+
tarball.
8+
9+
INSTALL:
10+
Put somewhere in your path. Or just set the PATH environment variable.
11+
12+
You will need a Perl module called Term::ANSIColor by Russ Allbery and
13+
Zenin (thanks for it).
14+
15+
You can download from the CPAN archive:
16+
http://www.cpan.org/modules/by-module/Term/ ,
17+
or (when you use Debian GNU/Linux potato) simply type:
18+
apt-get install libansicolor-perl
19+
20+
USAGE:
21+
Just pipe the logs in the script, and have fun.
22+
23+
EXAMPLE:
24+
cat /var/log/daemon.log | colorize
25+
tail -0f /var/log/daemon.log /var/log/apache/access.log | colorize
26+
colorize < /var/log/messages
27+
28+
TIPS:
29+
In TIPS file and in examples directory.

THANKS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
I wanna say thanks to these people for their patch:
2+
- jamie <walkah@aci.on.ca>, for apache log fix (user bug)
3+
- Scott Griffith <sgriffith@cypresstech.net> for color spray fix (resetcol bug)

TIPS

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
1.) Use with syslog-ng (or other syslog maybe):
2+
3+
syslog-ng.conf (part):
4+
# colorize destination
5+
destination colorize { pipe("/dev/colorize"); };
6+
7+
log { source(src); filter(f_cnews); destination(colorize); };
8+
log { source(src); filter(f_cother); destination(colorize); };
9+
10+
We need some system modifications (need root privileges):
11+
# First we make a fifo
12+
mkfifo /dev/colorize
13+
# Setting permissions
14+
chmod 640 /dev/colorize && chown root.adm /dev/colorize
15+
16+
# And after all, we start colorize (user in adm group or root)
17+
colorize < /dev/colorize > /dev/tty12
18+
19+
2.) Or the other solution (Mw3's tip):
20+
21+
syslog-ng.conf (part):
22+
# My colorize
23+
destination colorize { program("/usr/local/bin/colorize > /dev/tty12"); };
24+
log { source(src); destination(colorize); }
25+
26+
And that's all... (please check colorize path!)
27+
28+
3.) You can found other tips (examples) under examples directory.

TODO

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* complete
2+
! half complete/not the best solution
3+
- whishlist item
4+
? i don't know
5+
6+
TODO list:
7+
8+
! FLUSH FLUSH FLUSH FLUSH!! (FILE->flush();)
9+
* FIX! Exim log format
10+
* convert unix timestamp to date format (toma)
11+
* procmail log (Anh Lai)
12+
* remove syslog facility number from output
13+
- snort, ipchains, proftpd ([drewie])
14+
- postfix log (mhp)
15+
- iplog log (Mw3)
16+
? bell on some event (QUErot)
17+
? only catch real ips (256.256.256.256 not!)
18+
with option (Andras and fu)

changelog.gz

3.27 KB
Binary file not shown.

0 commit comments

Comments
 (0)