Results 1 to 6 of 6
Thread: Code colouring maillog
-
05-30-2005, 07:40 AM #1Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Code colouring maillog
Does anyone know of a way to have maillog code coloured while it's tailed in shell?
-
05-30-2005, 07:16 PM #2
It's POSSIBLE to do this, but doing it would mean modifying the source of your email client, and it would make the file output useless for anyone who wants to just view the file through a real editor.
Tom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons
-
05-31-2005, 02:59 AM #3Web Hosting Master
- Join Date
- Dec 2004
- Location
- Canada
- Posts
- 1,097
http://www.gnu.org/software/src-highlite/ is probably what you're looking for.
-
05-31-2005, 06:35 AM #4Web Hosting Guru
- Join Date
- Jul 2004
- Location
- Reporting Live from Marrz
- Posts
- 257
Originally posted by linux-tech
It's POSSIBLE to do this, but doing it would mean modifying the source of your email client, and it would make the file output useless for anyone who wants to just view the file through a real editor.
I was thinking about coloring 'on the fly' (or better say 'on the scroll' - I know it's possible, I saw a Perl script the other day that someone used to highlights specific keywords - which didn't change the logging itself - just filtered in a way.
So what error404 gave me as a link might also be useful - it actually generates a separate file from the log - good for periodical logfile analyzing. I'll certainly have a look at it.
Thanks guys
-
05-31-2005, 01:31 PM #5Newbie
- Join Date
- May 2005
- Location
- Scranton, PA
- Posts
- 18
You can do this with a program like color wrapper, which just wraps common unix text in ansi color. It's available at:
http://freshmeat.net/projects/cw/
I use it on all my linux boxes, it's nice to have some color splashed in there, makes some stuff easier to read. Not sure if it'll do the mail logs, but it should color when tailing. Try it out, if you like it, be sure to rate it at freshmeat, Vade79 is a good guy and could use the popularityBurstNET® - The Speed the Internet Travels™
BurstNET® - an INC500™ Company
BurstNET - 1-877-BURSTNET - sales@burst.net
http://www.burst.net-http://www.nocster.net
-
06-01-2005, 01:31 AM #6Web Hosting Master
- Join Date
- Dec 2004
- Location
- Canada
- Posts
- 1,097
Originally posted by SupaDucta
Agreed, and I would never want to do this - keep the logs standardized.
I was thinking about coloring 'on the fly' (or better say 'on the scroll' - I know it's possible, I saw a Perl script the other day that someone used to highlights specific keywords - which didn't change the logging itself - just filtered in a way.
So what error404 gave me as a link might also be useful - it actually generates a separate file from the log - good for periodical logfile analyzing. I'll certainly have a look at it.
Thanks guys
Code:source-highlight -s log -f esc < /var/log/mail.log