Skip to content

Logger emits message on invalid property name#9570

Merged
maridematte merged 4 commits intodotnet:mainfrom
maridematte:9475
Jan 4, 2024
Merged

Logger emits message on invalid property name#9570
maridematte merged 4 commits intodotnet:mainfrom
maridematte:9475

Conversation

@maridematte
Copy link
Copy Markdown
Member

Fixes #9475

Context

When a property name is an invalid input, we log the error and shutdown the loggers when terminating the process. However, we did not flush the logs of any messages being processed before shutting down, making we miss this specific error in the process.

Changes Made

Added a wait for loggers to finish doing their work before shutting down.

Testing

Added a test to make sure that the logger emits the message before shutdown.

Copy link
Copy Markdown
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

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

Thanks for resolving this! Nice, elegant solution 🙂

Comment thread src/MSBuild.UnitTests/XMake_Tests.cs Outdated
Copy link
Copy Markdown
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Looks good!

@maridematte maridematte merged commit abb49cf into dotnet:main Jan 4, 2024
@maridematte maridematte deleted the 9475 branch January 10, 2024 13:38
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.

Invalid property name passed at the command line does not emit error

3 participants