Question regarding Asterisk log files

I’m currently using FreePBX 2.9.0beta2.3. I want to disable logging into /var/log/asterisk/full file. This setting exists in /etc/asterisk/logger_logfiles_additional.conf.
is auto-generated, so my question is how to disable this setting?


I have 2 places logrotate.d is located but i’m assuming you are talking about creating a file in /etc/logrotate.d with the above stated script.

You can always empty this file with cron:
cat /dev/null > full
but I’m looking for permanent solution. It seems that these settings are missing!?

the ‘proper’ solution is called logrotate

this is a linux related tool and is what should be used for all of your log files whether your system log, Asterisk logs, etc.

it’s very likely you already have one on your system for other log files and need to add the Asterisk logs and tell it how often you want them rotated, how many you want to keep, etc…

here is an example of what you could do by making a file under logrotate.d:

/var/log/asterisk/messages /var/log/asterisk/*log /var/log/asterisk/full {
rotate 7
create 0640 asterisk asterisk
  /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null

It says to rotate it nighly, keeping the last 7, and what to execute after the file has been rotated.

My /var/log/asterisk/full file is 4.5GB I just want to know how to make it smaller.