Repository navigation
Log exception details from MSBuildLogger - #17423
Merged
akoeplinger merged 1 commit intoAug 27, 2026
Merged
akoeplinger merged 1 commit into
akoeplinger merged 1 commit into
Conversation
Append exception details to messages forwarded from Microsoft.Extensions.Logging so MSBuild output includes the exception type, message, and stack trace. Co-authored-by: Copilot <[email protected]> Copilot-Session: b9317408-5bfc-493f-97cd-c3d8ba4d032c
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves build output diagnostics by ensuring exception details (type, message, stack trace) are included when Microsoft.Extensions.Logging messages are forwarded into MSBuild logging, where the default formatter may omit exceptions.
Changes:
- Append
exception.ToString()to the formatted log message when an exception is present. - Preserve existing MSBuild severity mapping for
LogLeveltoTaskLoggingHelpercalls.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ViktorHofer
approved these changes
Aug 27, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The standard
Microsoft.Extensions.Loggingformatter does not include the exception in the formatted message. Append the exception when forwarding logs to MSBuild so the exception type, message, and stack trace are visible in build output.