I need to rotate some Tomcat logs in Solaris. When I try to use logadm with the -c option, the rotation seems to occur correctly, but then catalina.out becomes a block of nulls the same size as the rotated part, and new data is written after these nulls. It's as if the file position pointer never moved, and Tomcat's output keeps advancing from the same position.
As a result, catalina.out continues to grow. The leading block of nulls grows with every rotation event.
When it works, this is the most convenient log rotation solution I know of, because you don't have to modify catalina.sh. But it isn't working, and the alternative -- piping the output through Apache logrotate -- requires modifying catalina.sh, which I'd rather not do. It means another local change to track every time we update Tomcat.