Skip to content

Commit cc4642f

Browse files
michaelklishinmergify[bot]
authored andcommitted
Make it possible to override the license line in the startup banner
This is for Tanzu RabbitMQ, nothing changes for the open source edition. (cherry picked from commit b815902) (cherry picked from commit 4aa1b42)
1 parent 370f125 commit cc4642f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

deps/rabbit/src/rabbit.erl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
-export([product_info/0,
2727
product_name/0,
2828
product_version/0,
29+
product_license_line/0,
2930
base_product_name/0,
3031
base_product_version/0,
3132
motd_file/0,
@@ -919,14 +920,14 @@ start(normal, []) ->
919920
[product_name(), product_version(), rabbit_misc:otp_release(),
920921
emu_flavor(),
921922
BaseName, BaseVersion,
922-
?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE],
923+
?COPYRIGHT_MESSAGE, product_license_line()],
923924
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH});
924925
_ ->
925926
?LOG_INFO(
926927
"~n Starting ~ts ~ts on Erlang ~ts [~ts]~n ~ts~n ~ts",
927928
[product_name(), product_version(), rabbit_misc:otp_release(),
928929
emu_flavor(),
929-
?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE],
930+
?COPYRIGHT_MESSAGE, product_license_line()],
930931
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH})
931932
end,
932933
log_motd(),
@@ -1313,7 +1314,7 @@ print_banner() ->
13131314
"~n Logs: ~ts" ++ LogFmt ++ "~n"
13141315
"~n Config file(s): ~ts" ++ CfgFmt ++ "~n"
13151316
"~n Starting broker...",
1316-
[Product, Version, ?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE] ++
1317+
[Product, Version, ?COPYRIGHT_MESSAGE, product_license_line()] ++
13171318
[rabbit_misc:otp_release(), emu_flavor(), crypto_version()] ++
13181319
MOTDArgs ++
13191320
LogLocations ++
@@ -1497,6 +1498,10 @@ product_name() ->
14971498
#{product_base_name := BaseName} -> BaseName
14981499
end.
14991500

1501+
-spec product_license_line() -> string().
1502+
product_license_line() ->
1503+
application:get_env(rabbit, license_line, ?INFORMATION_MESSAGE).
1504+
15001505
-spec product_version() -> string().
15011506

15021507
product_version() ->

0 commit comments

Comments
 (0)