-
-
Notifications
You must be signed in to change notification settings - Fork 1k
add quiet logger #2161
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
base: master
Are you sure you want to change the base?
add quiet logger #2161
Changes from 3 commits
fcf693d
80d2f38
c70dc82
dc04230
8a57548
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| using BenchmarkDotNet.Configs; | ||
| using JetBrains.Annotations; | ||
| using System; | ||
|
|
||
| namespace BenchmarkDotNet.Attributes | ||
| { | ||
| /// <summary> | ||
| /// determines if all auto-generated files should be kept or removed after running the benchmarks | ||
| /// </summary> | ||
| [PublicAPI] | ||
| [AttributeUsage(AttributeTargets.Class)] | ||
| public class QuietModeAttribute : Attribute, IConfigSource | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO there should be 1 attribute for all verbosity options and 1 cmd option instead of a separate attribute/option for each.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure I understand this, the attribute/options are just different ways of configuring the same mode, with quiet=false you get the same output as before with quiet=true you only get the more relevant output
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I'm mean about it: #190 (comment) It would be intuitive to see the following api: [ConsoleVerbosity(Verbosity.Diagnostic, writeOutputFromGeneratedProject: true/false)]
[ConsoleVerbosity(Verbosity.Detailed)] // your PR does this level
[ConsoleVerbosity(Verbosity.Normal)]
[ConsoleVerbosity(Verbosity.Minimal)]
[ConsoleVerbosity(Verbosity.Quiet)]cmd If we implement your PR, it would be hard to do the standard .NET And the naming
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand now the full proposal, I had not seen last Adam's message on the issue, I will work on this during the next couple of days!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems to me that this can be quite complicated. My proposal is not final. PS. If you don't do it, I'll get to it in a month. Any progress that you make will be very helpful!! |
||
| { | ||
| public IConfig Config { get; } | ||
|
|
||
| public QuietModeAttribute(bool value = false) | ||
| { | ||
| Config = ManualConfig.CreateEmpty().WithOption(ConfigOptions.QuietMode, value); | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.