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?