-   Programming (
-   -   Extrac values as highlting a growing file (

smc2 09-08-2010 06:17 AM

Extrac values as highlting a growing file
I have a growing log file. Part of it is like below. I'm using tail and perl -e to watch to hight and track events on this log file.
this is the command now I am using.
PHP Code:

tail -f $fName perl -pe 's/\d*smscid\s*inserted.*\d*/\e[1;32m$&\e[0m/ig;s/(.*(\-\-\-\-)+\>.*)/\e[1;33m$&\e[0m/ig' 

do you know how can I change the Perl script it to extract all of the value (I show the values in red color in the log file below) as color it change their color?

----------------------------Log file-----------------------------
msg_recieve6-->2010-09-08 14:39:48.475sid queue size---->2
scid getting prepareStatement
scid addBatch
scid addBatch
scid executeBatch
scid commit

2scid inserted ...2
msg_recieve24-->2010-09-08 14:39:49.675msg_recieve-->2010-09-08 14:39:49.675Link--->true
msg_recieve6-->2010-09-08 14:39:49.995Link--->true
sid queue size---->1

All times are GMT -5. The time now is 03:42 AM.