Is there a logging / log rotation tool which allows me to pipe output into it and it will log it in a particular way? Basically what I'm looging for would have an interface something like the following
$ ./run_my_tool | stdin2log --path=/path/to/logs --rotate=10 --compress
$ ./run_my_tool | stdin2log --file=/path/to/logs/number%dfile --rotate=10 --compress=bz2
I have looked at logrotate and it doesn't really handle logging output from standard out if the programs you want to log can be run more than once a day. I have also thought about using the append operator (>>) but I want to keep the logs for each individual execution seperate. I have had a good look on Sourceforge and Freshmeat but cannot find anything like it. I can't believe no one has thought of this before, I can only think there is a reason why it is a bad idea. If no one knows of a tool like this and people think it's a good idea I'll happily implement it myself, I just don't want to go re-inventing the wheel.