chore(boot-log): print a warning at boot when running on old otp
This commit is contained in:
parent
2d150127d4
commit
e06b54ff71
|
@ -33,6 +33,7 @@
|
|||
%%--------------------------------------------------------------------
|
||||
|
||||
start(_Type, _Args) ->
|
||||
print_otp_version_warning(),
|
||||
print_banner(),
|
||||
ekka:start(),
|
||||
{ok, Sup} = emqx_sup:start_link(),
|
||||
|
@ -56,6 +57,15 @@ stop(_State) ->
|
|||
%% Print Banner
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-if(?OTP_RELEASE> 22).
|
||||
print_otp_version_warning() -> ok.
|
||||
-else.
|
||||
print_otp_version_warning() ->
|
||||
io:format("WARNING: Running on Erlang/OTP version ~p. Recommended: 23~n",
|
||||
[?OTP_RELEASE]).
|
||||
-endif.
|
||||
|
||||
|
||||
print_banner() ->
|
||||
io:format("Starting ~s on node ~s~n", [?APP, node()]).
|
||||
|
||||
|
|
Loading…
Reference in New Issue