Bernstein's multilog program (part of the daemontools package) may beuseful. It is designed to read input from standard input and willdo log rotation. Documentation is available at:http://cr.yp.to/daemontools/multilog.html