diff options
| author | Michael Klishin <michael@novemberain.com> | 2015-03-26 13:47:25 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@novemberain.com> | 2015-03-26 13:47:25 +0300 |
| commit | 61274598921dd35d3566a373333ec95d3f75d7af (patch) | |
| tree | 15d4beedcc7d93e3c16bc72cfa0cc135645f9228 | |
| parent | 8114304057647986ed212658657dc2f2d51b488b (diff) | |
| parent | 619e58245f9d912fe7db915cbb2097483c6cb72f (diff) | |
| download | rabbitmq-server-git-61274598921dd35d3566a373333ec95d3f75d7af.tar.gz | |
Merge pull request #81 from rabbitmq/rabbitmq-server-74
PR for rabbitmq/rabbitmq-server#74
| -rw-r--r-- | docs/rabbitmq.config.example | 2 | ||||
| -rw-r--r-- | src/rabbit_channel.erl | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/docs/rabbitmq.config.example b/docs/rabbitmq.config.example index c9329cf2c4..9b3855cd86 100644 --- a/docs/rabbitmq.config.example +++ b/docs/rabbitmq.config.example @@ -36,7 +36,7 @@ %% One of 'debug', 'info', 'warning', 'error' or 'none', in decreasing %% order of verbosity. Defaults to 'info'. %% - %% {log_levels, [{connection, info}]}, + %% {log_levels, [{connection, info}, {channel, info}]}, %% Set to 'true' to perform reverse DNS lookups when accepting a %% connection. Hostnames will then be shown instead of IP addresses diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 63a5eb7e79..4e2a9e11f7 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -484,6 +484,8 @@ format_message_queue(Opt, MQ) -> rabbit_misc:format_message_queue(Opt, MQ). %%--------------------------------------------------------------------------- +log(Level, Fmt, Args) -> rabbit_log:log(channel, Level, Fmt, Args). + reply(Reply, NewState) -> {reply, Reply, next_state(NewState), hibernate}. noreply(NewState) -> {noreply, next_state(NewState), hibernate}. @@ -520,10 +522,10 @@ handle_exception(Reason, State = #ch{protocol = Protocol, {_Result, State1} = notify_queues(State), case rabbit_binary_generator:map_exception(Channel, Reason, Protocol) of {Channel, CloseMethod} -> - rabbit_log:error("Channel error on connection ~p (~s, vhost: '~s'," - " user: '~s'), channel ~p:~n~p~n", - [ConnPid, ConnName, VHost, User#user.username, - Channel, Reason]), + log(error, "Channel error on connection ~p (~s, vhost: '~s'," + " user: '~s'), channel ~p:~n~p~n", + [ConnPid, ConnName, VHost, User#user.username, + Channel, Reason]), ok = rabbit_writer:send_command(WriterPid, CloseMethod), {noreply, State1}; {0, _} -> |
