You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(amazonq): sync lsp logging with local configuration. (#7186)
## Problem
Same problem as #7172
## Solution
- listen to logLevel change events, and forward them to LSP.
- pass initial logLevel to the LSP as well.
- This requires mapping the local levels to the Flare Levels. This is
done with the following:
```
export const lspLogLevelMapping: Map<vscode.LogLevel, LspLogLevel> = new Map([
[vscode.LogLevel.Error, 'error'],
[vscode.LogLevel.Warning, 'warn'],
[vscode.LogLevel.Info, 'info'],
[vscode.LogLevel.Debug, 'log'],
[vscode.LogLevel.Trace, 'debug'],
[vscode.LogLevel.Off, 'error'], // TODO: once the language server supports a no-log setting, we can map to that.
])
```
## Notes
- Because of this mapping, it means that to enabled 'debug' logs in
Flare, we set to 'trace' in VSC which can be confusing for contributors.
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
* The language server logging levels do not directly match those used in VSC. Therefore, we must perform a mapping defined by {@link lspLogLevelMapping}
0 commit comments