Error logs not rotating

The error logs in /var/log/asterisk are not rotating as desired. It seems like they are rotating with the default settings. 7 days with no file size limit. I want to change this so they rotate every 5 days and limit the logs size to 50MB as in if the log reaches 50MB it purges. how can this be done? I have freepbx as well and trying to modify the /etc/asterisk/logger.conf and all the custom .conf’s with it but their is literally no write ups on how to modify these files. So I modified the /etc/logrotate/logger.d/asterisk to include:
rotate 5
daily
size 50M

but this has had no affect. What do I do here?!

You edit the files with any means appropriate for Unix/Linux text files.

logger.conf is documented in the sample configuration files supplied with Asterisk. It doesn’t support size limits. You need to make your own arrangements to issue “logger rotate”. (FreePBX may do that, but FreePBX isn’t supported here.

logrotate is not part of Asterisk, but typically comes with Linux. It is documented in the Linux man pages. It has no maximum size directive, but only a minimum size one. Size will only be checked when it is run, which is typically once a day. You probably need to get it to run “logger reload”.

Further details are in voip-info.org/wiki/view/logrotate