I'm looking for a cronolog-like tool that will keep only last n lines or last x minutes of logs piped to it and discard everything else
Is there such a beast?
UPDATE:
I know about logrotate and it renames and zips old logfiles, which is not what I want.
I want to discard old log lines and keep only recent lines.
Like i.e. doing this every so often: tail -10000 logfile > logfile.new mv logfile.new logfile except that with this technique you will most certainly lose log lines and you have to restart or otherwise signal the logging application to reopen the logfile.