Linux-Java logs rotating using log4j or logrotate.d
In general, I usually use log4j for logging and initial rotations, and I use logrotate for compression and archiving. The reason is that I try and keep the logging rules, including which file(s) to log, size, naming convention, etc. to be associated with the application.I then try and put the sysadmin type configurations, like how many to keep, when to compress, when to move to backup directory in the logrotate.