-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
12 changed files
with
1,179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Oops, something went wrong.