Make logging fall into the pit of success #11581
Merged
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.
A bright eyed young developer recently added a log message to our code, because they wanted to be kind, helpful, and allow Razor tooling developers to help customers track down issues in future. Little did they know that our logging infrastructure was actually the PIT OF DESPAIR in disguise! To save this kind soul, and hopefully avoid their drive for success from being beaten down further that our regular baseline level of despair these days, I have decided to renovate the pit into a pit of success!
Before:
[LSP][Diagnostics.RazorTranslateDiagnosticsService] [08:20:43.7052932] Dropping diagnostic Microsoft.VisualStudio.LanguageServer.Protocol.SumType`2[System.Int32,System.String]:; expected at csharp range Microsoft.VisualStudio.LanguageServer.Protocol.Range
After:
[LSP][Diagnostics.RazorTranslateDiagnosticsService] [08:20:43.7052932] Dropping diagnostic CS1002:; expected at csharp range (134, 22)-(134, 22)