Skip to content

Rabbitmq Logging

How to enable logging in rabbitmq

We can enable rabbitmq logging in log files and console. But better approaches are to use logging/events exchanges.

Rabbitmq has two exchanges to publish logs/events

1) amq.rabbitmq.event (enable plugin rabbitmq_event_exchange)
2) amq.rabbitmq.log (update config - log.exchange = true)

We can bind the queues to these exchanges. We can write a application that reads messages from these queues and sends it to elastic/storage.

More details here - https://www.rabbitmq.com/docs/event-exchange

When installing rabbitmq with helm chart the file logging is disabled by default and we log "info" level logs on console. We can adjust the logging level. Info does not give much information.

log.console.level = debug

We can fine tune the logging like below:-

log.file.level = debug
log.connection.level = info

This will restrict the "connection" category logs to info.





TODO - Verify what we log in service bus and we can replicate the logging behavior in rabbitmq