@@ -380,9 +380,8 @@ run_prelaunch_second_phase() ->
380
380
start_it (StartType ) ->
381
381
case spawn_boot_marker () of
382
382
{ok , Marker } ->
383
- Product = product_name (),
384
383
T0 = erlang :timestamp (),
385
- rabbit_log :info (" ~s is asked to start..." , [ Product ] ),
384
+ rabbit_log :info (" RabbitMQ is asked to start..." ),
386
385
try
387
386
{ok , _ } = application :ensure_all_started (rabbitmq_prelaunch ,
388
387
StartType ),
@@ -392,8 +391,8 @@ start_it(StartType) ->
392
391
393
392
T1 = erlang :timestamp (),
394
393
rabbit_log_prelaunch :debug (
395
- " Time to start ~s : ~p µs" ,
396
- [Product , timer :now_diff (T1 , T0 )]),
394
+ " Time to start RabbitMQ : ~p µs" ,
395
+ [timer :now_diff (T1 , T0 )]),
397
396
stop_boot_marker (Marker ),
398
397
ok
399
398
catch
@@ -1311,7 +1310,6 @@ product_info() ->
1311
1310
#{name => NameFromEnv ,
1312
1311
version => VersionFromEnv };
1313
1312
true ->
1314
- _ = application :load (rabbit ),
1315
1313
Name = case NameFromEnv of
1316
1314
undefined ->
1317
1315
string_from_app_env (
@@ -1363,12 +1361,22 @@ base_product_version() ->
1363
1361
rabbit_misc :version ().
1364
1362
1365
1363
motd_file () ->
1366
- case rabbit_env :get_context () of
1367
- #{motd_file := File } ->
1364
+ % % Precendence is:
1365
+ % % 1. The environment variable;
1366
+ % % 2. The `motd_file` configuration parameter;
1367
+ % % 3. The default value.
1368
+ Context = rabbit_env :get_context (),
1369
+ case Context of
1370
+ #{motd_file := File ,
1371
+ var_origins := #{motd_file := environment }}
1372
+ when File =/= undefined ->
1368
1373
File ;
1369
1374
_ ->
1370
- _ = application :load (rabbit ),
1371
- string_from_app_env (motd_file , undefined )
1375
+ Default = case Context of
1376
+ #{motd_file := File } -> File ;
1377
+ _ -> undefined
1378
+ end ,
1379
+ string_from_app_env (motd_file , Default )
1372
1380
end .
1373
1381
1374
1382
motd () ->
0 commit comments