Repository navigation
refactor: route host diagnostics through ILogger - #986
Merged
Merged
Conversation
albertospelta
force-pushed
the
refactor/diagnostics-through-ilogger
branch
2 times, most recently
from
October 21, 2026 23:07
d242ebd to
083ed8c
Compare
albertospelta
marked this pull request as ready for review
October 21, 2026 23:09
albertospelta
force-pushed
the
refactor/diagnostics-through-ilogger
branch
from
October 21, 2026 23:52
083ed8c to
17a9a86
Compare
Every AppEnvironment.AddDiagnostics call is now a [LoggerMessage] method; static call sites log in their caller or take an ILogger. AddDiagnostics, IsDiagnosticLevelVerbose, AppEnvironment.Diagnostics and DiagnosticMessage are removed. DiagnosticLevelSwitch carries the user's diagnostic level into a logger filter rule: the pane store receives Information only at Verbose, while Microsoft and System categories stay at Warning. The bootstrap applies the saved level and UpdateOptions applies a changed one after every save attempt. DiagnosticLogStore keeps the last 1000 records, bounded by text size too, with template, placeholder values and the exception chain (aggregate inners and the properties each exception type adds). GetDiagnostics takes a cursor and a maximum count instead of marking records as read, so a reload of the pane loses no host record. The pane polls at every level except None, shows JSON values as a tree and highlights records with an exception. The catch-all problem details mapping no longer logs, since the middleware logs 500 responses; mapped exceptions are logged and tracked through one method. The per-message copy redacts the same five sensitive tags as telemetry, and a test keeps the two tag lists aligned.
albertospelta
force-pushed
the
refactor/diagnostics-through-ilogger
branch
from
October 21, 2026 23:59
17a9a86 to
65dc02d
Compare
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.
Every AppEnvironment.AddDiagnostics call is now a [LoggerMessage] method;
static call sites log in their caller or take an ILogger. AddDiagnostics,
IsDiagnosticLevelVerbose, AppEnvironment.Diagnostics and DiagnosticMessage
are removed.
DiagnosticLevelSwitch carries the user's diagnostic level into a logger filter
rule: the pane store receives Information only at Verbose, while Microsoft and
System categories stay at Warning. The bootstrap applies the saved level and
UpdateOptions applies a changed one after every save attempt.
DiagnosticLogStore keeps the last 1000 records, bounded by text size too,
with template, placeholder values and the exception chain (aggregate inners
and the properties each exception type adds). GetDiagnostics takes a cursor
and a maximum count instead of marking records as read, so a reload of the
pane loses no host record. The pane polls at every level except None, shows
JSON values as a tree and highlights records with an exception.
The catch-all problem details mapping no longer logs, since the middleware
logs 500 responses; mapped exceptions are logged and tracked through one
method. The per-message copy redacts the same five sensitive tags as
telemetry, and a test keeps the two tag lists aligned.