Reduce CLI diagnostic log noise and improve process logging#15956
Reduce CLI diagnostic log noise and improve process logging#15956
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15956Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15956" |
There was a problem hiding this comment.
Pull request overview
This PR reduces diagnostic log noise in the Aspire CLI while improving the clarity and consistency of process execution logging. It also adds a startup log of all known feature flag states and avoids redundant feature-flag evaluation in NuGet package filtering.
Changes:
- Centralize “suppress logging” behavior in
ProcessExecutionFactoryby usingNullLoggerand simplifyProcessExecutionlogging branches. - Add
IFeatures.LogFeatureState()and call it at CLI startup to emit feature flag state for diagnostics. - Reduce log verbosity for cache/feature default behavior and avoid repeated
IsFeatureEnabledcalls inside per-package filter lambdas.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Cli/Program.cs | Calls LogFeatureState() during startup to surface feature configuration in logs. |
| src/Aspire.Cli/NuGet/NuGetPackageCache.cs | Hoists ShowDeprecatedPackages evaluation outside the per-package filter lambda. |
| src/Aspire.Cli/NuGet/BundleNuGetPackageCache.cs | Hoists ShowDeprecatedPackages evaluation outside the per-package filter lambda. |
| src/Aspire.Cli/DotNet/ProcessExecutionFactory.cs | Uses NullLogger when suppressed and improves “running process” log context. |
| src/Aspire.Cli/DotNet/ProcessExecution.cs | Removes per-callsite suppression checks; adjusts process start/wait and stream forwarding logging. |
| src/Aspire.Cli/Configuration/IFeatures.cs | Adds new LogFeatureState() API to the internal feature service contract. |
| src/Aspire.Cli/Configuration/Features.cs | Downgrades default-value log to Trace and implements LogFeatureState(). |
| src/Aspire.Cli/Caching/DiskCache.cs | Downgrades cache hit/miss/store/delete logs from Debug to Trace. |
954444d to
2011c88
Compare
…gging, add trailing newlines
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
|
🎬 CLI E2E Test Recordings — 56 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24168436170 |
Description
Reduces diagnostic log noise in the Aspire CLI and improves process execution logging clarity.
Changes:
SuppressLoggingat every log call site, the factory now passesNullLogger.Instancewhen logging is suppressed. This simplifiesProcessExecutionby removing all conditional logging branches.DebugtoTraceto reduce noise. AddedLogFeatureState()method that logs all feature flag states at startup.LogFeatureState()at startup so feature configuration is visible in diagnostic logs.IsFeatureEnabledcall out of the per-package filter lambda to avoid redundant evaluations.Checklist