Create a custom log file within /etc/logrotate.d directory.
touch /etc/logrotate.d/customlog
Add the following to your /etc/logrotate.d/customlog file.
/var/log/customlog { daily missingok compresscmd=/bin/gzip compressext=.gz compress sharedscripts # postrotate # endscript }
[highlighter]
Restart logrotate
sudo /usr/sbin/logrotate /etc/logrotate.conf
Done