Line numbers and exception to be caught in logs

Hi Folks,

I have just basic queries is that suppose I have to monitor the logs then there is a command , suppose I have to monitor the abc.log which is updating dynamically within seconds so the command will be after going to that directory is ..

 tail -f abc.log

Now please advise what about I want to also see the line numbers on the putty as rite now line. Numbers are not visible and also advise

Also please advise that if I choose

tail -f

then logs keep rotating what about if I want when ever the exception comes it should stop at that time and should Highlight the exception what will be the command to catch the word Exception while tailing the logs :confused:

For the first part try:

tail -f abc.log | cat -n

If your cat supports the -n option

--
The second part I had trouble following. Could you provide an examples and more details?