apachelogcolor
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apachelogcolor [2006/11/09 17:38] – 209.8.40.21 | apachelogcolor [2006/11/13 13:32] (current) – old revision restored andi | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Apache logfile colorizer ====== | ||
+ | |||
+ | This simple script reads loglines in Apaches " | ||
+ | |||
+ | <code perl> | ||
+ | # | ||
+ | |||
+ | $black=" | ||
+ | $red=" | ||
+ | $green=" | ||
+ | $yellow=" | ||
+ | $blue=" | ||
+ | $magenta=" | ||
+ | $cyan=" | ||
+ | $white=" | ||
+ | |||
+ | while(< | ||
+ | | ||
+ | |||
+ | print $red; | ||
+ | print "$1 "; | ||
+ | print $green; | ||
+ | print "$6 "; | ||
+ | print $yellow; | ||
+ | print "$5 "; | ||
+ | print $cyan; | ||
+ | print "$8 "; | ||
+ | print $magenta; | ||
+ | print "$9 "; | ||
+ | print $white; | ||
+ | print " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Example Usage: | ||
+ | |||
+ | $> tail -f / | ||
+ | |||
apachelogcolor.txt · Last modified: 2006/11/13 13:32 by andi