mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Show "null" in loglevel command completions
This was already supported, but the completions didn't list it.
This commit is contained in:
@@ -51,7 +51,7 @@ END TEMPLATE-->
|
||||
|
||||
### Other
|
||||
|
||||
*None yet*
|
||||
* The `loglevel` command now properly shows the "`null`" log level that resets the level to inheriting from parent. This was already supported by it, but the completions didn't list it.
|
||||
|
||||
### Internal
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace Robust.Shared.Console.Commands;
|
||||
|
||||
internal sealed class LogSetLevelCommand : LocalizedCommands
|
||||
{
|
||||
private const string LevelNull = "null";
|
||||
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
|
||||
public override string Command => "loglevel";
|
||||
@@ -21,7 +23,7 @@ internal sealed class LogSetLevelCommand : LocalizedCommands
|
||||
var name = args[0];
|
||||
var levelname = args[1];
|
||||
LogLevel? level;
|
||||
if (levelname == "null")
|
||||
if (levelname == LevelNull)
|
||||
{
|
||||
level = null;
|
||||
}
|
||||
@@ -49,7 +51,7 @@ internal sealed class LogSetLevelCommand : LocalizedCommands
|
||||
"<sawmill>");
|
||||
case 2:
|
||||
return CompletionResult.FromHintOptions(
|
||||
Enum.GetNames<LogLevel>(),
|
||||
Enum.GetNames<LogLevel>().Union([LevelNull]),
|
||||
"<level>");
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user