Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change verbosity levels to the recommended ones by System.CommandLine #221

Open
erikbra opened this issue Jul 28, 2022 · 0 comments
Open

Comments

@erikbra
Copy link
Owner

erikbra commented Jul 28, 2022

Is your feature request related to a problem? Please describe.
The verbosity levels are p.t. linked to the default values in Microsoft.Extensions.Logging (see https://erikbra.github.io/grate/configuration-options/)

However, the documentation for System.CommandLine recommends different verbosity levels, in line with other command-line tools, like e.g. dotnet, and msbuild. I think those are more intuitive too. See https://docs.microsoft.com/en-us/dotnet/standard/commandline/syntax#the---verbosity-option

Describe the solution you'd like
We should use the following verbosity levels:

  • Q[uiet]
  • M[inimal]
  • N[ormal]
  • D[etailed]
  • Diag[nostic]

Instead of the current ones, which are:

  • Critical
  • Debug
  • Error
  • Information
  • None
  • Trace
  • Warning

The mapping to the current values, which are the ones used throughout in code, should be done on parsing the command line, so that we don't change a lot of code for this.The following logic should be used when mapping the verbosity levels to minimum log levels:

  • Quiet -> Error
  • Minimal -> Warning
  • Normal -> Information
  • Detailed -> Debug
  • Diag -> Trace

For backwards compatibility, we should also accept the current values, but mark them as obsolete (maybe wait a couple of releases before making them obsolete)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant