A software writes its logs on a file ("tonsOf.log"). Those logs are mostly useless and I process them later on with some pattern matching (line by line). So, for say 1 GB of logs, I end up with 40KB of useful information.

I am wondering is the following is possible:

Without modifying the software, instead of writting the contents to that file, send them to a different software that will do the pattern matching (perhaps grep) and discard the raw data (perhaps redirect them to /dev/null). The important thing is that the software should still think it is writting the logs to the file (so that it won't throw errors).

Can it be done? Where do I even start?


Make the target log file a named pipe, with your filtering script on the other side.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.