##日志默认输出位置
如果我们是通过rpm方式进行安装的,那么系统默认会把日志放在
/var/log/rabbitmq/目录下
日志说明
在日志目录/var/log/rabbitmq目录下,默认会有两类日志文件,一个是rabbit@{hostname}.log,另一个是rabbit@{hostname}-sasl.log。
rabbit@{hostname}.log:输出rabbitmq运行相关的信息,如网络流量,用户,交换器,队列等信息。rabbit@{hostname}-sasl.log:Erlang运行相关信息。
日志样例
rabbit@{hostname}.log
=INFO REPORT==== 1-Nov-2016::16:46:44 === accepting AMQP connection <0.22806.952> (172.21.20.23:57962 -> 172.21.1.207:5672) =ERROR REPORT==== 1-Nov-2016::16:46:44 === Channel error on connection <0.22806.952> (172.21.20.23:57962 -> 172.21.1.207:5672, vhost: '/', user: 'liyang'), channel 1: operation queue.declare caused a channel exception precondition_failed: "inequivalent arg 'x-dead-letter-exchange' for queue 'mailQueue' in vhost '/': received none but current is the value 'dead_letter_exchange' of type 'longstr'" =WARNING REPORT==== 1-Nov-2016::16:50:18 === closing AMQP connection <0.22806.952> (172.21.20.23:57962 -> 172.21.1.207:5672): client unexpectedly closed TCP connection ... ...
rabbit@{hostname}-sasl.log
如果运行了rabbitmq集群或者rabbitmq依赖的erlang操作报错,这个文件才会有输出信息。后面再补充样例数据。