summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bakken <luke@bakken.io>2019-04-10 09:12:57 -0700
committerGitHub <noreply@github.com>2019-04-10 09:12:57 -0700
commite52513ac0753723c90cbd386290583ff93776e06 (patch)
tree08be817c21f6613d2768a0184c493daed69af490
parent99e883e3fedb58270ac6b6b8e83982f4ef3e7038 (diff)
parent8daafd8191d77fca7194326042a2295c33ed0a9e (diff)
downloadrabbitmq-server-git-e52513ac0753723c90cbd386290583ff93776e06.tar.gz
Merge pull request #1974 from rabbitmq/rabbitmq-server-1973
Make sure amq.rabbitmq.log is accessible to client connections
-rw-r--r--src/lager_exchange_backend.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lager_exchange_backend.erl b/src/lager_exchange_backend.erl
index e1af365b4d..ced1611883 100644
--- a/src/lager_exchange_backend.erl
+++ b/src/lager_exchange_backend.erl
@@ -187,13 +187,14 @@ maybe_init_exchange(State) ->
%% @private
init_exchange(true) ->
{ok, DefaultVHost} = application:get_env(rabbit, default_vhost),
- VHost = rabbit_misc:r(DefaultVHost, exchange, ?LOG_EXCH_NAME),
+ Exchange = rabbit_misc:r(DefaultVHost, exchange, ?LOG_EXCH_NAME),
try
- #exchange{} = rabbit_exchange:declare(VHost, topic, true, false, true, [], ?INTERNAL_USER),
- {ok, #resource{virtual_host=DefaultVHost, kind=exchange, name=?LOG_EXCH_NAME}}
+ %% durable
+ #exchange{} = rabbit_exchange:declare(Exchange, topic, true, false, false, [], ?INTERNAL_USER),
+ {ok, Exchange}
catch
ErrType:Err ->
- rabbit_log:debug("Could not initialize exchange '~s' in vhost '~s', reason: ~p:~p",
+ rabbit_log:error("Could not declare exchange '~s' in vhost '~s', reason: ~p:~p",
[?LOG_EXCH_NAME, DefaultVHost, ErrType, Err]),
{ok, undefined}
end;