How to configure log rotation on Windows OS

1,009 views
Skip to first unread message

H R

unread,
Nov 8, 2022, 12:37:30 AM11/8/22
to rabbitmq-users
Hello All

I want to set the rotation of the log output to the following path on Windows OS.
C:\Users\%USERNAME%\AppData\Roaming

I can't figure it out even after looking at the guide.
I would like to know.

Regards,
Ryo

H R

unread,
Nov 8, 2022, 3:41:41 AM11/8/22
to rabbitmq-users
Please let me know if you have any questions. share additional information
I'm Japanese, so I'm not good at English, but I'm looking forward to working with you.

2022年11月8日火曜日 14:37:30 UTC+9 H R:

Luke Bakken

unread,
Nov 8, 2022, 10:09:36 AM11/8/22
to rabbitmq-users
https://www.rabbitmq.com/logging.html#log-rotation

Please attach your RabbitMQ configuration file from  C:\Users\%USERNAME%\AppData\Roaming\RabbitMQ\rabbitmq.conf

Log files will be rotated in the same directory as they are originally stored. By default, this is C:\Users\%USERNAME%\AppData\Roaming\RabbitMQ\log

Thanks,
Luke

H R

unread,
Nov 8, 2022, 6:21:54 PM11/8/22
to rabbitmq-users

Share the RabbitMQ configuration file.
But it didn't seem to mention anything.


Thanks,
Ryo
2022年11月9日水曜日 0:09:36 UTC+9 luker...@gmail.com:
rabbitmq.config

Luke Bakken

unread,
Nov 9, 2022, 1:31:29 PM11/9/22
to rabbitmq-users
Hello,

Please do the following:

Rename  C:\Users\%USERNAME%\AppData\Roaming\RabbitMQ\rabbitmq.config to  C:\Users\%USERNAME%\AppData\Roaming\RabbitMQ\advanced.config

Create the following file - NOTE the extension is .conf

C:\Users\%USERNAME%\AppData\Roaming\RabbitMQ\rabbitmq.conf

Open that file in a text editor like Notepad, and add these lines:

# rotate when the file reaches 10 MiB
log.file.rotation.size = 10485760
# keep up to 5 archived log files in addition to the current one
log.file.rotation.count = 5

Restart RabbitMQ.

Thanks,
Luke

H R

unread,
Nov 10, 2022, 5:43:30 AM11/10/22
to rabbitmq-users
Hello

Thank you for your reply.
I modified and added the file as per the attached file.
However, it fails to launch the RabbitMQ service.
Is there a problem with how the file is written?

Thanks,
Ryo
2022年11月10日木曜日 3:31:29 UTC+9 luker...@gmail.com:
advanced.config
rabbitmq.conf

Luke Bakken

unread,
Nov 10, 2022, 11:14:38 AM11/10/22
to rabbitmq-users
Hello,

Use the attached two files.

advanced.config
rabbitmq.conf

H R

unread,
Nov 10, 2022, 10:18:28 PM11/10/22
to rabbitmq-users
Hello,

I also tried that pattern, but the service could not start as well.
Is it related to environment variables or something?
If I change it back to rabbitmq.config it works fine.

Thanks,
Ryo
2022年11月11日金曜日 1:14:38 UTC+9 luker...@gmail.com:

Luke Bakken

unread,
Nov 11, 2022, 9:13:17 AM11/11/22
to rabbitm...@googlegroups.com
What version of RabbitMQ and Erlang are you using?

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/dbvLMFnGAvE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/cda5ceb1-e159-4336-8363-d12cbaa81e89n%40googlegroups.com.

H R

unread,
Nov 22, 2022, 3:03:50 AM11/22/22
to rabbitm...@googlegroups.com
Sorry for my late reply

RabbitMQ :3.6.5
Sorry, I don't know how to check the version of Erlang.


2022年11月11日(金) 23:13 Luke Bakken <luker...@gmail.com>:
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/CAL50wM9Tk%2BMKn4cax2VFtBhuCBCSS%3D1YkbYKcZQydsvJG2xdkA%40mail.gmail.com.

Luke Bakken

unread,
Nov 23, 2022, 9:59:38 AM11/23/22
to rabbitmq-users
Log rotation is not supported by RabbitMQ on Windows on that version. Upgrade to the latest version of RabbitMQ (3.11.3) and Erlang (25.1.2) and my instructions will work.

Thanks -
Luke

Reply all
Reply to author
Forward
0 new messages