summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <michael@rabbitmq.com>2014-06-17 06:25:11 +0400
committerMichael Klishin <michael@rabbitmq.com>2014-06-17 06:25:11 +0400
commitde12430efcda4a49ccb2d5577061a2a72576bc88 (patch)
tree3bcf5a8b0853190bf9f98e9830922f129166551c /src
parentf8bc55318701eb6bc52ddca4f348d94b06312363 (diff)
downloadrabbitmq-server-git-de12430efcda4a49ccb2d5577061a2a72576bc88.tar.gz
Include vhost and username into channel error log messages
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 1fabf10acc..db6aa989eb 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -437,14 +437,20 @@ handle_exception(Reason, State = #ch{protocol = Protocol,
channel = Channel,
writer_pid = WriterPid,
reader_pid = ReaderPid,
- conn_name = ConnName
+ conn_name = ConnName,
+ virtual_host = VHost,
+ user = #user{
+ username = Username
+ }
}) ->
%% something bad's happened: notify_queues may not be 'ok'
{_Result, State1} = notify_queues(State),
case rabbit_binary_generator:map_exception(Channel, Reason, Protocol) of
{Channel, CloseMethod} ->
- rabbit_log:error("connection ~s, channel ~p - soft error:~n~p~n",
- [ConnName, Channel, Reason]),
+ rabbit_log:error("vhost ~s, user ~s, connection ~s, channel ~p - soft error:~n~p~n",
+ [binary_to_list(VHost),
+ binary_to_list(Username),
+ ConnName, Channel, Reason]),
ok = rabbit_writer:send_command(WriterPid, CloseMethod),
{noreply, State1};
{0, _} ->