Skip to content

Commit

Permalink
Merge pull request #115 from fiskaltrust/113-add-v-and-verbosity-alia…
Browse files Browse the repository at this point in the history
…ses-for-log-level

Added -v and --verbosity aliases for the --log-level option
  • Loading branch information
pawelvds authored Oct 23, 2023
2 parents d14f892 + 05b9fa2 commit b9d1d92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ private T WithDefault<T>(T value, Func<T> defaultValue)

private LogLevel? _logLevel;
[JsonPropertyName("logLevel")]
[AlternateName("verbosity")]
public LogLevel? LogLevel { get => WithDefault(_logLevel, Microsoft.Extensions.Logging.LogLevel.Information); set => _logLevel = value; }

private Uri? _packagesUrl;
Expand Down
2 changes: 1 addition & 1 deletion src/fiskaltrust.Launcher/Commands/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public CommonCommand(string name, bool addCliOnlyParameters = true) : base(name)
AddOption(new Option<string?>("--access-token"));
AddOption(new Option<bool>("--sandbox"));
AddOption(new Option<string?>("--log-folder"));
AddOption(new Option<LogLevel?>("--log-level"));
AddOption(new Option<LogLevel?>(new[] { "--log-level", "-v", "--verbosity" }, "Sets the verbosity level of the logging."));

if (addCliOnlyParameters)
{
Expand Down
2 changes: 2 additions & 0 deletions src/fiskaltrust.Launcher/Commands/ConfigCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public ConfigCommand() : base("config")
AddOption(new Option<string>("--launcher-configuration-file", getDefaultValue: () => "launcher.configuration.json"));
AddCommand(new ConfigSetCommand());
AddCommand(new ConfigGetCommand());
AddOption(new Option<LogLevel?>(new[] { "--log-level", "-v", "--verbosity" }, "Sets the verbosity level of the logging."));

}
}

Expand Down

0 comments on commit b9d1d92

Please sign in to comment.