best way to rotate rabbitmq log files
The best choice is put the log rotate logical inside your rabbitmq.conf file like below:
{log, [
{file, [{file, "/var/log/rabbitmq/rabbitmq.log"}, %% log.file
{level, info}, %% log.file.info
{date, "$D0"}, %% log.file.rotation.date
{size, 1024}, %% log.file.rotation.size
{count, 15} %% log.file.rotation.count
]}
]},
You can use the command .
rabbitmqctl rotate_logs
Its working for me. Read more from the http://www.rabbitmq.com/configure.html
Hope it will help you.