[rabbitmq-discuss] Inconsistent log rotation

Alexandru Scvorţov alexandru at rabbitmq.com
Tue Aug 9 17:34:40 BST 2011


Hi Lionel,

Sorry for the late reply.

> It seems that RabbitMQ log rotation happens in two different places:
>  - in the rabbitmq-server script, using cat and RABBITMQ_BACKUP_EXTENSION
>  - in the init script, using rabbitmqctl and ROTATE_SUFFIX

That's absolutely right.

> Is the use of two different variables really intended?

As you've found out, the two "log rotations" are quite different:
  1. When RabbitMQ is started up, it will always start on a new file.
  To prevent loss of information, we always append the current log file
  to the end of a backup file (whose filename is constructed by
  appending RABBITMQ_BACKUP_EXTENSION).
  2. When a user manually rotates logs, that is, when a user manually
  executes rabbitmqctl rotate_logs or via the init script, the server
  appends it's current log to the backup log file (whose name is
  constructed by appending ROTATE_SUFFIX) and starts using a
  fresh log.

They are two different processes, started in two different ways, so it's
not quite clear that they should use the same variable (though, they
could).

I'll file a bug for this; not sure if it will get resolved soon, though.

Has this behaviour caused any problems for you?

Cheers,
Alex

On Fri, Aug 05, 2011 at 12:19:29PM +0200, Lionel Cons wrote:
> It seems that RabbitMQ log rotation happens in two different places:
>  - in the rabbitmq-server script, using cat and RABBITMQ_BACKUP_EXTENSION
>  - in the init script, using rabbitmqctl and ROTATE_SUFFIX
> 
> Is the use of two different variables really intended?
> 
> If not, I would suggest to use only one (for instance
> RABBITMQ_BACKUP_EXTENSION) and to document it at
> http://www.rabbitmq.com/configure.html#define-environment-variables.
> 
> If it's really intended, it then requires even more documentation ;-)
> 
> Cheers,
> 
> Lionel
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list