-
Notifications
You must be signed in to change notification settings - Fork 747
feat(amazonq): add setting to configure lsp log level #7172
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
Closed
Closed
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0aff18b
feat: add setting to configure lsp log level
Hweinstock e033744
refactor: clean up
Hweinstock fecfa59
test: add tests for logic
Hweinstock db8c544
docs: update comment
Hweinstock e456dae
docs: update comment
Hweinstock 3c1796d
feat: add settings section for ls specific settings
Hweinstock 05fcc6a
feat: sync log level settings with lsp
Hweinstock 718ce7e
docs: remove extra logging statement
Hweinstock 2102ce1
refactor: avoid duplicating variable
Hweinstock ec7c8a5
docs: update docs
Hweinstock 89e5c33
docs: use traceChannel consistently
Hweinstock 9cd9698
docs: update docs to include information about the new settings
Hweinstock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/amazonq/test/unit/amazonq/lsp/chat/config.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /*! | ||
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| import assert from 'assert' | ||
| import { sanitizeLogLevel } from '../../../../../src/lsp/config' | ||
|
|
||
| describe('sanitizeLogLevel', function () { | ||
| it('should return the log level if it is valid', function () { | ||
| const logLevel = 'info' | ||
| const sanitizedLogLevel = sanitizeLogLevel(logLevel) | ||
| assert.strictEqual(sanitizedLogLevel, logLevel) | ||
| }) | ||
|
|
||
| it('should default to info if it is invalid', function () { | ||
| const logLevel = 'verbose' | ||
| const sanitizedLogLevel = sanitizeLogLevel(logLevel) | ||
| assert.strictEqual(sanitizedLogLevel, 'info') | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Should this be explained somewhere in the documentation? Also I don't see
traceChannelbeing used specifically in the code anywhereThere 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.
Why isn't
amazonq.lsp.tracedefined here? Does it not need to be, or we want to hide from users?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.
I renamed
amazonq.lsp.tracetoamazonQ.lsp.traceChannelhowever didn't update the reference in the docs. Good catch, should be updated now.