Skip to content

Conversation

@deniszykov
Copy link

fix for #2101

@deniszykov
Copy link
Author

@microsoft-github-policy-service agree

@augustoproiete augustoproiete changed the title fix: disable report printing if verbosity of logger is Quiet GH-2101: Disable report printing if verbosity of logger is Quiet Apr 19, 2023
@augustoproiete augustoproiete requested a review from a team April 19, 2023 14:13
@gep13
Copy link
Member

gep13 commented Dec 6, 2025

@deniszykov rather than create a new PR, I have taken the liberty to update this PR using the suggested approach discussed in the original issue.

Please let me know if you have any concerns about me doing this.

@deniszykov
Copy link
Author

@deniszykov rather than create a new PR, I have taken the liberty to update this PR using the suggested approach discussed in the original issue.

Please let me know if you have any concerns about me doing this.

I don't mind, and thanks. I was actually thinking of adding another logging level below Quiet. But I solved my problem differently and forgot about this PR.

@gep13 gep13 force-pushed the feature/no-output-on-log-quiet branch from 1ea2f39 to 162e5c9 Compare December 6, 2025 17:20
@gep13
Copy link
Member

gep13 commented Dec 6, 2025

@deniszykov said...
I don't mind, and thanks.

Perfect! I have started a process of reviewing some of the older PR's that we have, and I stumbled across your one.

@gep13 gep13 changed the title GH-2101: Disable report printing if verbosity of logger is Quiet GH2101: Disable report printing if verbosity of logger is Quiet Dec 6, 2025
As part of a normal Cake execution, a report summary is always shown at
the end. This includes information about what tasks were ran, how long
they took, etc.  However, there are those that don't want to allow this
to happen.  This commit introduces a new configuration option, which
allows the report summary to not be shown. This can be done in the
usual way with a command line parameter, cake.config file entry, or an
environment variable.
@gep13 gep13 force-pushed the feature/no-output-on-log-quiet branch from 162e5c9 to ca440e5 Compare December 6, 2025 17:38
var report = await Engine.RunTargetAsync(_context, _executionStrategy, Settings).ConfigureAwait(false);

if (report != null && !report.IsEmpty)
var noReportEnabled = _configuration.GetValue("Settings_NoReport") ?? bool.FalseString;
Copy link
Member

Choose a reason for hiding this comment

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

@devlead I tried to use the Constants class here, rather than the hard coded Settings_NoReport, but it is marked internal. Should I create a new Constants class in the Cake.Cli project?

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

Successfully merging this pull request may close these issues.

CakeReportPrinter should be disabled in Verbosity = Quiet

3 participants