[asterisk-users] Asterisk Log rotate not working

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue May 21 12:21:12 CDT 2013


On Tue, May 21, 2013 at 11:29:37AM -0500, Jason Parker wrote:
> On 05/21/2013 10:19 AM, Ahmed Munir wrote:
> >Hi,
> >
> >Last year, I installed Asterisk 10.4.2 and enabled logrotate on
> >daily basis which was working perfect. Now in couple of months
> >back, the logrotate feature is not working at all but simply
> >appending the logs in 'messages' file. Listing down down the
> >configuration for logrotate below;
> >
> >/var/log/asterisk/messages {
> >missingok
> >rotate 5
> >daily
> >postrotate
> >/usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
> >endscript
> >}

> I believe you want to execute "logger rotate", rather than "logger reload".

It is indeed 'logger reload'. logrotate handles the rotation. All it
needs is that Asterisk will re-open the log file to use the new files
after the old ones were moved.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list