Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: Support LogOutputChannel #76

Closed
wants to merge 1 commit into from
Closed

plugin: Support LogOutputChannel #76

wants to merge 1 commit into from

Conversation

ndoschek
Copy link

What it does

  • Support LogOutputChannel
  • Support LogLevel
  • Support in namespace/env: logLevel & onDidChangeLogLevel

Resolves eclipse-theia#12017

Contributed on behalf of STMicroelectronics.

Remark:

This PR contributes the basic VS Code API support for LogOutputChannels, to fully support all aspects of a LogOutputViewChannel as in VS Code some additional features will be needed:

  • In VSCode there is support to set the "Developer log level" in the application which also configures the log level for LogOutputviewChannels. Currently the log level for LogOutputChannels is set to the default log level, i.e. info.
  • VSCode also writes the logs to a separate file per extension and offers a command and tool in the output view to directly open the extensions's log file.

I suggest to extract those additional features into separate follow-up issues if you agree.

How to test

To test, I created a simple extension that creates a LogOutputChannel and contributes commands to send log messages in different levels:
vscode-extension-log-output-channel-12017-0.0.1.zip

  1. Download and install the test extension vscode-extension-log-output-channel-12017-0.0.1.vsix in your Theia test workspace (via Extensions view - top menu bar More actions... - Install from VSIX).
  2. On activation of the extension, the log output channel LogOutputChannel-Test-12017 is shown in the output view and the initial message (LogLevel set to: Info) should be shown.
  3. Execute the commands (Log a <loglevel> message via LogOutputChannel) via the command palette and check for the messages in the output channel.
    Remark: Currently the loglevel is set to default INFO log level.

Review checklist

Reminder for reviewers

@ndoschek ndoschek changed the base branch from master to 0.6.1 April 18, 2023 07:31
@ndoschek ndoschek changed the base branch from 0.6.1 to master April 18, 2023 07:31
- Support LogOutputChannel
- Support LogLevel
- Support in namespace/env: logLevel & onDidChangeLogLevel
- Remark: Needs further extension of application to fully support all aspects of a LogOutputViewChannel (i.e. developer logger service, logging to file, extension of output view UI)

Resolves eclipse-theia#12017

Contributed on behalf of STMicroelectronics.

Signed-off-by: Nina Doschek <[email protected]>
@rschnekenbu rschnekenbu self-requested a review April 19, 2023 15:37
Copy link

@rschnekenbu rschnekenbu left a comment

Choose a reason for hiding this comment

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

Thanks, that looks good to me!
I tested also to change the loglevel in packages/plugin-ext/src/plugin/output-channel/logoutput-channel.ts to trace and I could get a log for all levels.

@ndoschek
Copy link
Author

Thank you @rschnekenbu! Closing this in favour of eclipse-theia#12429

@ndoschek ndoschek closed this Apr 20, 2023
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.

[vscode] Support LogOutputChannel
2 participants