CLI: set OTP logger log level to 'error'

References #8912
This commit is contained in:
Michael Klishin 2023-07-19 20:25:54 +04:00
parent ce02538e58
commit bd3b44aab9
No known key found for this signature in database
GPG Key ID: FF4F6501646A9C9A
1 changed files with 8 additions and 0 deletions

View File

@ -26,10 +26,18 @@ defmodule RabbitMQCtl do
@spec main(list()) :: no_return()
def main(["--auto-complete" | []]) do
# silence Erlang/OTP's standard library warnings, it's acceptable for CLI tools,
# see rabbitmq/rabbitmq-server#8912
:logger.set_primary_config(:level, :error)
handle_shutdown(:ok)
end
def main(unparsed_command) do
# silence Erlang/OTP's standard library warnings, it's acceptable for CLI tools,
# see rabbitmq/rabbitmq-server#8912
:logger.set_primary_config(:level, :error)
exec_command(unparsed_command, &process_output/3)
|> handle_shutdown
end