-
Notifications
You must be signed in to change notification settings - Fork 763
Log DCP messages at Debug/Trace level in AppHost #12533
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
Conversation
Co-authored-by: davidfowl <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12533Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12533" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reduces the verbosity of DCP (Distributed Container Platform) logs in the AppHost output by downgrading all DCP log levels to Debug or Trace. The change acknowledges that DCP errors now flow to resources and can be filtered out, so they no longer need to be logged at their original severity levels in the AppHost output.
- Changes DCP log level mapping to always use Debug (or Trace for Trace-level logs) instead of the original log level
- Updates fallback logging for unparseable DCP logs from Information to Debug
- Adds comprehensive test coverage using Theory pattern to verify all log levels are correctly parsed
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Hosting/Dcp/DcpHost.cs | Maps all DCP log levels to Debug/Trace to reduce noise, adds explanatory comment about the change |
| tests/Aspire.Hosting.Tests/Dcp/DcpLogParserTests.cs | Adds parameterized test to verify parser handles all log levels correctly |
|
/backport to release/13.0 |
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18993029761 |
DCP errors now flow to resources and are displayed in resource context. AppHost should not duplicate these logs at their original severity levels (Error/Warning/Info), creating console noise.
Changes
Modified
DcpHost.LogSocketOutputAsyncto map all DCP log levels to Debug/Trace:Added test
TryParseDcpLog_ParsesAllLogLevelsto validate parser handles all DCP log levels.Impact
DCP diagnostics are hidden from AppHost console by default. Users can enable Debug/Trace logging if needed. Resource-specific DCP errors remain visible in resource context.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.