Skip to content

Conversation

@filzrev
Copy link
Contributor

@filzrev filzrev commented Dec 26, 2025

This PR intended to fix #10946 and fix #10945.

What's changed in this PR

  1. Add logics to unwrap ‘AggregateException‘ if have only single inner exception.
  2. Add code to write exception log if ReportLogListener exists.
  3. Add dedicated exception logging path for Console.IsOutputRedirected: true environment to avoid line wrap issue.
  4. Add Logger cleanup code on global exception handler.

@filzrev filzrev force-pushed the chore-fix-exception-log-write-logics branch from 5d93974 to 0bdaea1 Compare December 26, 2025 11:23
@filzrev filzrev force-pushed the chore-fix-exception-log-write-logics branch from 0bdaea1 to 8be6b08 Compare December 26, 2025 13:14
}
finally
{
Logger.ResetCount();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When this test is executed.
‘Logger.HasError‘ global state is modified.
And it cause InitBuild test failure.

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.

[Bug] Log file is not properly recorded when exception thrown [Bug] Exception stack trace by Spectre console wraps horribly in MSBuild

1 participant