RFC: Standardize Logging Levels and Meanings
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- powershell, typescript, vscode
- Domain
- documentation, observability
Research direction
Start by reading the developer guide and the existing logging infrastructure in vscode-powershell and PSES. Map current message severities against the proposed Critical-through-Trace meanings, then document the guidelines and update existing severities; done means the guide and messages follow one consistent standard.
Written by the indexing model from the issue text.
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
Now that the logging infrastructure has been relatively standardized between vscode-powershell and PSES, I feel like we need to add some logging guidelines to the developer guide, and update severities for existing messages.
Proposed Design
I want there to be specific "layers" that you peel back as you need to investigate an issue, here's my thoughts in order of least verbose to most verbose:
- Critical: Fully unhandled exceptions or anything causing a hard stop/panic of PSES or the editor. These would almost always be surfaced as warning dialogs if at all possible.
- Error: Some functionality of the extension/LSP did not complete, but was handled and does not require a critical restart of the environment. Not necessarily surfaced to user outside of logs unless action required. No values shown unless it's explicitly relevant to the error (e.g. expected x but received y)
- Warning: Degraded but successfully completed behavior, Notify of deprecated functionality. Same rules as error (action required). Warning would be the default level, basically not logging anything and keeping performance up with logging noops unless something goes wrong (Maybe Info is better for newbies)
- Info/Verbose: Logs the high level steps of the initialization of PSES, and any configuration or operational changes.
- Debug: Logs the invocation of handlers, summary of request/response (without values), detail about steps such as launch process, etc.
- Trace: Full protocol logging including values
The overarching idea is that anything Debug or above would only contain values/potential PII about the environment itself, whereas trace may include everything the user did or requested including script contents, so users can feel fairly safe about analyzing and submitting debug level reports, whereas trace reports may require some sanitization.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 548
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/vscode-powershell
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PowerShell/vscode-powershell#5599 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/vscode-powershell#5592 · 2 comments · 1 reaction ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
PowerShell/vscode-powershell#5583 · 1 comment ·
-
powershell.scriptAnalysis.settingsPath (Description): Warning Message Should Provide A Workaround OpenArea-Code Formatting Issue-Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PowerShell/vscode-powershell#4653 · 3 comments · 4 reactions ·
-
nothing OpenIssue-Bug Needs: Triage
Difficulty 5/5 Over a week Newbie friendliness 5/100
PowerShell/vscode-powershell#5603 · 1 reaction ·
All issues in PowerShell/vscode-powershell
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·