轮换rabbitmq日志文件的最佳方法
我的兔子日志变得非常大,我想知道是否有更好的方法来控制旋转。我希望日志根据大小进行轮换,并且一次最多保留十个日志。到目前为止我发现的最好的方法是,您可以通过将 SERVER_START_ARGS="-kernel error_loggersilent"
放入rabbitmq.conf 文件中来关闭日志记录。有更好的办法吗?我想避免为此使用 crontab。
My rabbit logs are getting very large and I am wondering if there is a better way to control the rotation. I'd like the logs to rotate based on size, and to keep at most ten logs at a time. The best I've found so far is that you can turn off logging by putting SERVER_START_ARGS="-kernel error_logger silent"
into the rabbitmq.conf file. Is there a better way? I'd like to avoid using a crontab for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以使用该命令。
它对我有用。
从 http://www.rabbitmq.com/configure.html 阅读更多内容
希望对您有所帮助你。
You can use the command .
Its working for me.
Read more from the http://www.rabbitmq.com/configure.html
Hope it will help you.
最好的选择是将日志旋转逻辑放在rabbitmq.conf文件中,如下所示:
The best choice is put the log rotate logical inside your rabbitmq.conf file like below:
最好的方法是升级到 RabbitMQ 2.4.1。许多人仍在运行非常旧且过时的 RabbitMQ 软件,该软件存在大型持久日志问题。较新的版本可以更好地处理此问题,并且它们还具有管理插件(可通过网络访问)和更快的消息路由。
理想情况下,您首先升级到 Erlang R14B02,然后升级 RabbitMQ。
如果您要从源代码编译 RabbitMQ,请跳过 Erlang R14B03。
The best way to do this is to upgrade to RabbitMQ 2.4.1. A lot of people are still running very old and obsolete RabbitMQ software that has problems with large persister logs. Newer versions handle this much better, and they also have a management plugin (web accessible) and much faster message routing.
Ideally you would upgrade to Erlang R14B02 first, then upgrade RabbitMQ.
Skip Erlang R14B03 if you are going to compile RabbitMQ from source.
我认为最好的方法是使用配置文件。我尝试了以上方法,但它们对我不起作用。我使用了此处中的以下配置它有效:
您可以在此链接中找到有关日期、大小和计数的作用的信息 https://github.com/basho/lager
I think the best way is to use a config file. I tried above ways but they didn't work for me. I used the following configuration from here and it worked:
You can find info on what does date, size and count do in this link https://github.com/basho/lager