Change Log Rotation Default Value in WHM
In cPanel most of the events are saved in the log files. The Log files are saved in the location /usr/local/cpanel/logs which has information about some services like backup, access, error and etc. When there is a problem with the server and we cannot able to detect the exact issue, the server log will help us to investigate the mean cause of the issue. Sometimes these log files itself cause issues to the server because the server log entries are continuously appending the information which gets unmanageable and disk space would fill up. To prevent this, the server logs’ older information disappears into the abyss unless you rotate the logs.
Log rotation is a feature that fixes this type of issues. Files from location /usr/local/cpanel/logs can be selected and will be rotated based upon their size. The rotated files will be compressed and stored in /usr/local/cpanel/logs/archive/. The files are named to include the month in which they are rotated. Consequently, the file names do not relate in any way to the content of the file being rotated. Files are only rotated when they grow larger than the Log Rotation Size Threshold setting or the default of 300MB. The archived log files are left in place indefinitely. Files not chosen here will not ever be rotated by cPanel software.
We can change the default value from 300MB to desired value. For that please follow the following steps
1) Login to WHM.
2) Navigate to the option ‘Server Configuration’.
3) Select the option ‘Tweak Settings’.
4) This will list all the tweak settings available for the server, navigate to the setting “Stats and Logs”. This setting contains so many functional settings, from there select the option
‘Log rotation size threshold’. This setting allows you to specify a threshold above which the cpanellogd daemon rotates log files. Specify the value on the left side box.
If you need any further help, please do reach our support department.