Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

log verbosity in tye run #506

Merged
merged 2 commits into from
May 27, 2020
Merged

log verbosity in tye run #506

merged 2 commits into from
May 27, 2020

Conversation

areller
Copy link
Contributor

@areller areller commented May 26, 2020

We allow the user to specify the level of output verbosity when running tye run
The levels are

  • Debug - display all logs
  • Info (Default) - display only info (or warn/error) logs
  • Quiet - display only warn/error logs

Verbosity.Quiet => LogEventLevel.Warning,
Verbosity.Info => LogEventLevel.Information,
Verbosity.Debug => LogEventLevel.Verbose,
_ => default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean _ => default?
This is to appease the C# compiler :)
It throws a warning otherwise

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m asking why use default and not an end value like Verbose or Info for the default case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That _ => default should never happen. It's just an artifact of the compiler treating the enum as an integer. There is already a place where we set the default value for the verbosity, so I didn't want to repeat that in multiple places.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I got it.

@davidfowl davidfowl merged commit ea43a55 into dotnet:master May 27, 2020
@davidfowl
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants