Grep logs on the fly

Hi,

We use an application that is dumping logs to a file on disk. However, this is dumping very verbosely and there is no method of turning down the logging level. We need to remove certain contents from these before they are commited to disk.

Has anybody got any ideas how I can do this using grep maybe? This will have to run continually as long as the application runs.

Thanks

Harperonline:confused:

Can you provide us an example of how the execution of the application is performed?
What is the application and what OS are you running?
How big is the logfile that the application writes into. Do you stop the application at anytime or does it run 24x7 ??

Would be great if you could provide further information ... :wink:

Cheers,
Cameron

Perhaps:

tail -f logfile | grep whatever

Note that piping the output from tail like that can cause it to be treated in blocks, so the output may not be quite as real-time as you'd like, but try it and see.

true (and how very sad, now reading my post) :frowning: .... dang I need a coffee or two ...