diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2022-05-12 00:22:06 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-12 00:22:06 +0400 |
| commit | 7107e3ea9e97c189f932f62e6ec8b3e55a25a89f (patch) | |
| tree | b476f436072350c51fabc88b2f0a6ad94ae37313 | |
| parent | b522a1b3acf029ae5b7ebfcc64b39618d0c1640f (diff) | |
| parent | 542ffeebb589b602ac69b5063c6c5499155aad3e (diff) | |
| download | rabbitmq-server-git-7107e3ea9e97c189f932f62e6ec8b3e55a25a89f.tar.gz | |
Merge pull request #4793 from cloudamqp/log_levels
Clarify documented/allowed log_level arg of rabbitmqctl set_log_level
| -rw-r--r-- | deps/rabbit/docs/rabbitmqctl.8 | 4 | ||||
| -rw-r--r-- | deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/set_log_level_command.ex | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/deps/rabbit/docs/rabbitmqctl.8 b/deps/rabbit/docs/rabbitmqctl.8 index fb87ffbd95..4832948ea1 100644 --- a/deps/rabbit/docs/rabbitmqctl.8 +++ b/deps/rabbit/docs/rabbitmqctl.8 @@ -1968,7 +1968,7 @@ Values lower than 1.0 can be dangerous and should be used carefully. Sets log level in the running node .Pp Supported -.Ar type +.Ar log_level values are: .Bl -bullet -compact .It @@ -1980,6 +1980,8 @@ warning .It error .It +critical +.It none .El .Pp diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/set_log_level_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/set_log_level_command.ex index 0679dab542..97dbf20be0 100644 --- a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/set_log_level_command.ex +++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/set_log_level_command.ex @@ -7,6 +7,8 @@ defmodule RabbitMQ.CLI.Ctl.Commands.SetLogLevelCommand do alias RabbitMQ.CLI.Core.DocGuide @behaviour RabbitMQ.CLI.CommandBehaviour + # This command allows all log levels that the OTP logger defines + # but intentionally only documents those which are actually used in RabbitMQ @known_levels [ "debug", "info", @@ -34,7 +36,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.SetLogLevelCommand do :ok false -> - {:error, "level #{level} is not supported. Try one of debug, info, warning, error, none"} + {:error, "level #{level} is not supported. Try one of debug, info, warning, error, critical, none"} end end @@ -67,7 +69,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.SetLogLevelCommand do def output({:error, {:invalid_log_level, level}}, _opts) do {:error, RabbitMQ.CLI.Core.ExitCodes.exit_software(), - "level #{level} is not supported. Try one of debug, info, warning, error, none"} + "level #{level} is not supported. Try one of debug, info, warning, error, critical, none"} end use RabbitMQ.CLI.DefaultOutput |
