If Kannel is configured so that the bearerbox, wapbox and/or smsbox log to file each of these log files will continue to grow unless administered in some way. One way of reducing logs is by change log level. kannel allow to have 5 log-level ( 0 - debug, 1 - info, 2 - warning, 3 - error, 4 - panic). We can change log level by editing log-level component in configuration file and also done by admin HTTP command without restaring bearerbox.
Another way of administering log files is to ‘rotate’ the logs on a regular basis using a tool such as logrotate. A sample logrotate script is shown below.
Setup Logrotate
Step 1 : If logrotate is not already on your VPS, install it now.
1
sudo apt-get install logrotate
Step 2 : Add following script in file /etc/logrotate.d
In this example the Kannel log files found in /var/log/kannel are rotated and compressed daily over 365 days. To verify if a particular log is rotating or not and to check the last date and time of its rotation, check the /var/lib/logrotate/status file.