diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-04-24 15:09:43 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-04-30 18:19:32 +0200 |
| commit | 7f1684254685b1e3cb681879c71b79e512c93915 (patch) | |
| tree | 30e04331b1f85184b824faac7b14e35868550a15 | |
| parent | 151f10300115f5f100a39659486d1d496e9b5028 (diff) | |
| download | rabbitmq-server-git-7f1684254685b1e3cb681879c71b79e512c93915.tar.gz | |
rabbit: Include base product name & version in "Starting" logged message
When the product name & version are not overridden, the common logged
message is the following one:
2020-04-24 15:08:51.754 [info] <0.263.0>
Starting RabbitMQ 3.8.0+rc.1.278.g5cdf562.dirty on Erlang 21.3.8.13
Copyright (c) 2007-2020 VMware, Inc. or its affiliates.
Licensed under the MPL 1.1. Website: https://rabbitmq.com
Now, when the product name or version are overridden, the "Starting"
line mentions them. There is a second line added with the base product
name & version:
2020-04-24 15:08:51.754 [info] <0.263.0>
Starting RabbitMQ Enterprise Edition 2020.04 on Erlang 21.3.8.13
Based on RabbitMQ 3.8.0+rc.1.278.g5cdf562.dirty
Copyright (c) 2007-2020 VMware, Inc. or its affiliates.
Licensed under the MPL 1.1. Website: https://rabbitmq.com
| -rw-r--r-- | src/rabbit.erl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index eabd2dff07..5bf1ca0155 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -837,9 +837,20 @@ start(normal, []) -> try run_prelaunch_second_phase(), - rabbit_log:info("~n Starting ~s ~s on Erlang ~s~n ~s~n ~s~n", - [product_name(), product_version(), rabbit_misc:otp_release(), - ?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE]), + ProductInfo = product_info(), + case ProductInfo of + #{product_overridden := true, + product_base_name := BaseName, + product_base_version := BaseVersion} -> + rabbit_log:info("~n Starting ~s ~s on Erlang ~s~n Based on ~s ~s~n ~s~n ~s~n", + [product_name(), product_version(), rabbit_misc:otp_release(), + BaseName, BaseVersion, + ?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE]); + _ -> + rabbit_log:info("~n Starting ~s ~s on Erlang ~s~n ~s~n ~s~n", + [product_name(), product_version(), rabbit_misc:otp_release(), + ?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE]) + end, log_motd(), {ok, SupPid} = rabbit_sup:start_link(), |
