In Cpanel server, can we enable log rotation by number of days instead of size of the log files? One of the customers want to retain logs for last 7 days. How can we do it?
You could set entries manually into /etc/logrotate.conf file to set logs to rotate weekly rather than by size. This isn't something configurable in WHM > cPanel Log Rotation Configuration area itself.