Skip to content

Commit

Permalink
Initial revision
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.ssh.hu/svn/colorize/trunk@2 2bf76031-112b-435f-9534-88410ef3bb9f
  • Loading branch information
raszi committed Jul 30, 2002
1 parent 7f02a19 commit 4fb8a52
Show file tree
Hide file tree
Showing 12 changed files with 1,179 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ABOUT:
This is a short (no, it's not short anymore :) perl script to colorize'
your logs. You can use your own colors, you can simply modify your config
file in your home directory, or system-wide (/etc/colorize). Some colors
are shit, 'cause i start the script on my sisters' mono vga monitor. If
you have a good "theme", i please you, to send me, and i will put into
tarball.

INSTALL:
Put somewhere in your path. Or just set the PATH environment variable.

You will need a Perl module called Term::ANSIColor by Russ Allbery and
Zenin (thanks for it).

You can download from the CPAN archive:
http://www.cpan.org/modules/by-module/Term/ ,
or (when you use Debian GNU/Linux potato) simply type:
apt-get install libansicolor-perl

USAGE:
Just pipe the logs in the script, and have fun.

EXAMPLE:
cat /var/log/daemon.log | colorize
tail -0f /var/log/daemon.log /var/log/apache/access.log | colorize
colorize < /var/log/messages

TIPS:
In TIPS file and in examples directory.
3 changes: 3 additions & 0 deletions THANKS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
I wanna say thanks to these people for their patch:
- jamie <[email protected]>, for apache log fix (user bug)
- Scott Griffith <[email protected]> for color spray fix (resetcol bug)
28 changes: 28 additions & 0 deletions TIPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
1.) Use with syslog-ng (or other syslog maybe):

syslog-ng.conf (part):
# colorize destination
destination colorize { pipe("/dev/colorize"); };

log { source(src); filter(f_cnews); destination(colorize); };
log { source(src); filter(f_cother); destination(colorize); };

We need some system modifications (need root privileges):
# First we make a fifo
mkfifo /dev/colorize
# Setting permissions
chmod 640 /dev/colorize && chown root.adm /dev/colorize

# And after all, we start colorize (user in adm group or root)
colorize < /dev/colorize > /dev/tty12

2.) Or the other solution (Mw3's tip):

syslog-ng.conf (part):
# My colorize
destination colorize { program("/usr/local/bin/colorize > /dev/tty12"); };
log { source(src); destination(colorize); }

And that's all... (please check colorize path!)

3.) You can found other tips (examples) under examples directory.
18 changes: 18 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
* complete
! half complete/not the best solution
- whishlist item
? i don't know

TODO list:

! FLUSH FLUSH FLUSH FLUSH!! (FILE->flush();)
* FIX! Exim log format
* convert unix timestamp to date format (toma)
* procmail log (Anh Lai)
* remove syslog facility number from output
- snort, ipchains, proftpd ([drewie])
- postfix log (mhp)
- iplog log (Mw3)
? bell on some event (QUErot)
? only catch real ips (256.256.256.256 not!)
with option (Andras and fu)
Binary file added changelog.gz
Binary file not shown.
Loading

0 comments on commit 4fb8a52

Please sign in to comment.