-
Notifications
You must be signed in to change notification settings - Fork 747
feat(amazonq): sync lsp logging with local configuration. #7186
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
Conversation
|
| export type LogLevel = 'error' | 'warn' | 'info' | 'verbose' | 'debug' | ||
|
|
||
| export function fromVscodeLogLevel(logLevel: vscode.LogLevel): LogLevel { | ||
| if (!vscode.LogLevel) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimum version has been bumped since this was written
| "vscode": "^1.83.0" |
| * Log messages. Use `outputChannel` for application messages. | ||
| */ | ||
| logOutputChannel: OutputChannel | ||
| logOutputChannel: LogOutputChannel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LogOutputChannel extends OutputChannel and includes the ability to add listeners.
| shareCodeWhispererContentWithAWS: !CodeWhispererSettings.instance.isOptoutEnabled(), | ||
| }, | ||
| ] | ||
| case 'aws.logLevel': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this setting being added?
edit: oh, this is something sent to Q LSP, I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not being added for us no. This is the section used to detect logging level changes for this notification based on their implementation here.
packages/amazonq/src/lsp/config.ts
Outdated
| // https://github.com/aws/language-server-runtimes/blob/eae85672c345d8adaf4c8cbd741260b8a59750c4/runtimes/runtimes/util/loggingUtil.ts#L4-L10 | ||
| const validLspLogLevels = ['error', 'warn', 'info', 'log', 'debug'] as const | ||
| export type LspLogLevel = (typeof validLspLogLevels)[number] | ||
| export const lspLogLevelMapping: Map<vscode.LogLevel, LspLogLevel> = new Map([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be exported?
| export const lspLogLevelMapping: Map<vscode.LogLevel, LspLogLevel> = new Map([ | |
| const lspLogLevelMapping: Map<vscode.LogLevel, LspLogLevel> = new Map([ |
| } | ||
| } | ||
|
|
||
| export function toAmazonQLSPLogLevel(logLevel: vscode.LogLevel): LspLogLevel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets explain why briefly: "Maps the VS Code log level to an equivalent Amazon Q language server log level, since they are not 1:1"
|
failing test tracked here: #7187 |
Problem
Same problem as #7172
Solution
Notes
feature/xbranches will not be squash-merged at release time.