Log DCP messages at Debug/Trace level in AppHost#12533
Merged
Conversation
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update DCP errors to debug level output
Log DCP messages at Debug/Trace level in AppHost
Oct 31, 2025
Contributor
|
🚀 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" |
mitchdenny
approved these changes
Oct 31, 2025
Contributor
There was a problem hiding this comment.
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 |
davidfowl
reviewed
Nov 1, 2025
Member
|
/backport to release/13.0 |
Contributor
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18993029761 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.