Arseni Mourzenko
Arseni Mourzenko

Reputation: 52321

How do I set RabbitMQ logging level to debug, really?

I'm trying to figure out how to solve a specific problem with RabbitMQ 3.6.6. In order to gather some more information, I wanted to switch logs to debug level. However, it doesn't seem to work.

Here's the relevant part of /etc/rabbitmq/rabbitmq.config, inspired by the official documentation:

[
    {rabbit,
        [
            {log_levels, [{connection, debug}, {queue, debug}]},
            {log,
                [{file, [{level, debug}]},
                {categories,
                    [{connection,
                        [{level, debug}]
                    },
                    {queue,
                        [{level, debug}]
                    }
                    ]
                }]
            },
        ]
    }
]

However, what I see in the actual logs (after restarting the server) looks nothing like verbose logs. Not only all messages I see are marked only INFO REPORT or ERROR REPORT, but also when I create a queue, I see only two messages:

accepting AMQP connection [...]

Mirrored queue [...] in vhost [...]: Adding mirror on node [...]

which doesn't look particularly verbose.

So, how do I set log level to debug in RabbitMQ?

Upvotes: 8

Views: 23084

Answers (2)

Arseni Mourzenko
Arseni Mourzenko

Reputation: 52321

It appears that verbose logging is not that verbose, after all:

There's very little debug logging in 3.6.x (or earlier)[...]

In most cases debug logging isn't as useful as Erlang tracing capabilities or a traffic capture

The solution was to move to RabbitMQ 3.8.3, which seems having a bit more logs. Then, the log level can be changed like this with the new configuration format:

log.file.level = debug

Upvotes: 10

Soumen Mukherjee
Soumen Mukherjee

Reputation: 3272

Are you trying to look into the console logs , if yes , t , you need to configure the console log level as well by adding the additional node as

[
{rabbit,
    [
        {log_levels, [{connection, debug}, {queue, debug}]},
        {log,
            [{file, [{level, debug}]},
            {categories,
                [{connection,
                    [{level, debug}]
                },
                {queue,
                    [{level, debug}]
                },
                {console, 
                    [{enabled, true},
                     {level, debug}]
                }
                ]
            }]
        },
    ]
}

]

in the config file

Upvotes: 0

Related Questions