Skip to content

Support VS Code 'Set Log Level' #4441

Closed
@juvtib

Description

@juvtib

Prerequisites

  • I have written a descriptive issue title.
    I have searched all issues to ensure it has not already been reported.

Summary

VS Code version 1.76 has a "Developer: Set Log Level..." command. I tried using the command while I had a PowerShell project loaded. But I did not see an explicit option for the PowerShell extension. I'm not sure if the extension outputs to a generic log or if the PowerShell extension should be represented on this list.

Screen capture of VS Code log menu. There is no menu item for the PowerShell extension.

'Set Log Level' seems like a useful command. Please take a look at it and see if the PowerShell extension can support this VS Code command.

References

Proposed Design

No response

Activity

ghost added
Needs: TriageMaintainer attention needed!
on Mar 3, 2023
added
Feature: VS CodeRequest to use or implement a VS Code feature.
and removed
Needs: TriageMaintainer attention needed!
on Mar 7, 2023
JustinGrote

JustinGrote commented on Apr 10, 2023

@JustinGrote
Collaborator

Thanks for the Issue Submit!

So this is a fairly new API that logging has to be explicitly written for:
https://code.visualstudio.com/updates/v1_73#_log-output-channel

The PowerShell extension has its own logger implementation and would need to be updated for this new API.
https://vscode.dev/github/powershell/vscode-powershell/blob/019a9f8cf8509eaffff994af82b804b39e19d883/src/logging.ts#L49

And then wired up so that writeAtLevel and writeLine and related code paths submit properly to the output channel api, then the existing log level setting would need to be retired.

juvtib

juvtib commented on Apr 11, 2023

@juvtib
Author

Thanks for taking a look at it.

For reference, here is that logging line without Visual Studio Code for the Web.

this.logChannel = vscode.window.createOutputChannel("PowerShell Extension Logs");

self-assigned this
on Apr 18, 2023
JustinGrote

JustinGrote commented on Nov 1, 2024

@JustinGrote
Collaborator

Working on this in #5065 but there's some upstream vscode bugs I need addressed.

andyleejordan

andyleejordan commented on Nov 15, 2024

@andyleejordan
Member

Justin got this done!

3 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Support VS Code 'Set Log Level' · Issue #4441 · PowerShell/vscode-powershell